«De htmx a Django LiveView»

https://andros.dev/blog/785bf7ac/de-htmx-a-django-liveview/

Si usas htmx y estás evaluando Django LiveView, este artículo es para ti. Quiero enseñarte rápidamente las equivalencias de que sueles hacer con htmx y cómo lograrlo con Django LiveView. No es una comparación exhaustiva, sino una guía práctica para migrar o decidir cuál usar.

#htmx #python #django #djangoliveview #djangochannels #web
De htmx a Django LiveView | Andros Fenollosa

Si usas htmx y estás evaluando Django LiveView, este artículo es para ti. Quiero enseñarte rápidamente las equivalencias de que sueles hacer con htmx

«From htmx to Django LiveView»

https://en.andros.dev/blog/94d14a9e/from-htmx-to-django-liveview/

If you're using htmx and evaluating Django LiveView, this article is for you. I want to quickly show you the equivalences of what you usually do with htmx and how to achieve it with Django LiveView. It's not an exhaustive comparison, but a practical guide to migrate or decide which one to use.

#htmx #python #django #djangoliveview #djangochannels #web
From htmx to Django LiveView | Andros Fenollosa

If you're using htmx and evaluating Django LiveView, this article is for you. I want to quickly show you the equivalences of what you usually do with

I really love #Django #Channels but I keep hitting things that it's workers simply cannot do, like workers initializing themselves! And deeper I dig the more it seems the ASGI spec just isn't written to handle some of the problems I keep hitting.

I've got experience with Celery but I know it doesn't handle long running tasks, or bidirectional messaging (in addition to it's code being a total mind fuck).

Think I'm going to take some time to explore other task queues/workers.

#djangochannels

I have been working towards a #Django starter template that solves a lot of my problems. Figured I would share ;)

This template focuses on the frontend and includes things like #HTMX #DjangoChannels #Playwright and a few more of my favorite tools.

https://github.com/preludetech/Django-Starter-Template

GitHub - preludetech/Django-Starter-Template

Contribute to preludetech/Django-Starter-Template development by creating an account on GitHub.

GitHub
He actualizado el artículo.
Añadimos una situación muy común. Los usuarios tendrán que compartir un recurso que no se puede paralelizar. Podrías imaginar en una impresora. Si un usuario está imprimiendo, los demás tendrán que esperar.
#htmx #django #python #celery #huey #djangochannels #websockets #webdev
Publico nuevo artículo: «Sala de espera para tareas largas en Django»
https://programadorwebvalencia.com/sala-de-espera-para-tareas-largas-en-django/
Colócate en la siguiente situación: cuando un usuario pulsa un botón de tu web, se ejecuta una funcionalidad que tarda mucho tiempo en dar el resultado (tal vez 10 minutos). Sin embargo, la experiencia sería nefasta si esperara todo ese tiempo sin poder hacer nada. Por ello, decidimos que la tarea se ejecute en segundo plano, permitiendo al usuario seguir navegando por toda la web sin restricciones. Cuando termine la funcionalidad, se le notificará el resultado con un mensaje emergente. Y no solo eso, además le daremos un feedback en tiempo real del progreso. Sencillo de decir y complejo de hacer. ¿Cómo podemos lograrlo?
#htmx #django #python #celery #huey #djangochannels #websockets #webdev
Sala de espera para tareas largas en Django

Colócate en la siguiente situación: cuando un usuario pulsa un botón de tu web, se ejecuta una funcionalidad que tarda mucho tiempo en dar el resultado (tal vez 10 minutos). Sin embargo, la experiencia sería nefasta si esperara todo ese tiempo sin poder hacer nada. Por ello, decidimos que la tarea se ejecute en segundo plano, permitiendo al usuario seguir navegando por toda la web sin restricciones. Cuando termine la funcionalidad, se le notificará el resultado con un mensaje emergente. Y no solo eso, además le daremos un feedback en tiempo real del progreso. Sencillo de decir y complejo de...

Programador Web Valencia

Ok, in Django Channels, how do you handle long-lived consumers that need to do something periodically? Like, heartbeat messages or polling or whatever.

Best I've got is spawning a background task to just sit and sleep, but doing that properly is annoying.

#Python #Django #Channels #DjangoChannels

Ok, doing Server Sent Events (EventSource) in #DjangoChannels is annoying.

I kinda wish I could have a regular async view that could subscribe to a channel group.

Just got a little test of #django #channels running for #circles! It'll be a fun stream tommorow.

#djangochannels #python #html #css #javascript

Je cherche une lib/Framekwork en #Python pour faciliter l'écriture d'une appli avec des websockets. L'idée serait de pouvoir facilement d'avoir plusieurs groupes et d'envoyer des messages à un groupe.
Un peu comme #DjangoChannels mais sans la dépendance à #Django ;-) Des recommendations ? #Python #websockets