Reactive frontend using Django templates?

103 views
Skip to first unread message

Brylie Christopher Oxley

unread,
Nov 21, 2018, 2:48:25 PM11/21/18
to Django developers (Contributions to Django itself)
Hello,
I have been developing with Meteor.js for about four years now. One really nice aspect of Meteor is that it streams data to the client, which in turn updates the templates (e.g. adding chat messages to a list).

When I look for such a solution with Django, it seems that Channels is a solution for the streaming data, but there doesn't seem to be a way to reactively update client code generated by Django templates without making another server request to render the HTML.

I really like the Django template language, and don't want to switch away to a frontend framework, for several reasons. Are there any efforts to which I can contribute, with the goal of adding reactivity to client-side templates generated with the Django template language?

Best regards,
Brylie Christopher Oxley

Andrew Godwin

unread,
Nov 21, 2018, 3:00:47 PM11/21/18
to django-d...@googlegroups.com
Hi Brylie,

There are no such efforts at the moment - Django is still focused on being a backend language for the most part, and we don't really have any of the pieces in place to do dynamic template rendering. We're more focused on providing the fundamental components to let other people build that sort of stuff.

Andrew

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/82f35996-0663-43dc-951f-f2936670a37c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christian González

unread,
Nov 25, 2018, 1:24:34 PM11/25/18
to django-d...@googlegroups.com

Vue.JS could be a candidate to create that. I am currently experimenting in adding a plugin system to Django in form of an app "GDAPS" - Generic Django App Plugin System, find it on PyPi/Gitlab. It's in a very, very rude state at the beginning, and I am not an experienced developer.

But I'd like to try having Vue.js snippets distributed via Django templates, and maybe variables connected automatically using a simple REST or GraphQL interface.
I think using something "integrated" like Meteor is not the way Django should go, as it is too "narrow" and does not allow separating the server and client API - It's good to have an interface like REST or at least channels which clients can consume.

But ATM it's very hard to do that without much boilerplate-coding. I always wonder why anyone hasn't already done this.

GDAPS should be a plugin system in the first case, but I think that having a (maybe also pluggable) frontend (like Vue, React, Angular, Polymer etc.) there would be a good idea.

Maybe this is something completely different, but maybe you'll find some common parts with your intentions - feel free to share ideas.

Christian

Reply all
Reply to author
Forward
0 new messages