From bb5d8c9019f7ef5c2f830feb95c4126835d42f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=AD=C3=B0ir=20Valberg=20Gu=C3=B0mundsson?= Date: Wed, 17 May 2023 17:06:01 +0200 Subject: [PATCH] Upd. --- content/django-server-sent-events.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/django-server-sent-events.md b/content/django-server-sent-events.md index 7ffe62a..3bb6706 100644 --- a/content/django-server-sent-events.md +++ b/content/django-server-sent-events.md @@ -356,7 +356,7 @@ For this we'll have to update our `stream_messages` function as follows: :::python async def stream_messages() -> AsyncGenerator[str, None]: - connection_params = connection.get_connection_params() + connection_params = connection.get_connection_params() # Remove the cursor_factory parameter since I can't get # the default from Django 4.2.1 to work. @@ -435,9 +435,9 @@ Check out the repo for the full code where I've also added a simple form for sub ### Conclusion -Django might not be the shiniest framework out there, but it is solid and boring - which is a good thing! - -And with the continued work on async support, it is becoming a viable option for doing real time stuff, especially when paired with other solid and boring tech like PostgreSQL and SSE! +Django is boring, which is a good thing, to the degree where it is always the safe option. But with the advances in +async support it is becoming a viable, and shiny, option for doing real time stuff. Mix in some other solid and boring +tech like PostgreSQL and SSE, and you end up with a very solid foundation for building real time applications. [0]: https://docs.djangoproject.com/en/4.2/releases/4.2/#requests-and-responses [1]: https://docs.djangoproject.com/en/4.2/ref/request-response/#django.http.StreamingHttpResponse