Hello,
my 2 cents here. I've searched for years to find "the right"
frontend for Django. Tried, React, Angular, Vue, Svelte, and many
others, even developed GDAPS, a Django plugin system with flexible
optional frontend integration optionally (Vue only ATM - but the
frontend integration is stuck, read below why), and almost got
crazy. I ended up in forgetting all the frontend frameworks
altogether as they all are completely un-pythonic and
un-djangoish, get into your way and force you to re-write
everything you already had working.You have to write all the logic
of views again in your frontend of choice, and well, do the
validation *again* in the backend. So everything gets more
complex, with the "benefit" of getting a few milliseconds and
fewer round trips. It's just "cooler".
Oh, and yes, forget Django's template language. In the best case
the frontend barks at it and you have to define own variable
delimiters (Vue) if mixed into the templates, or it isn't even
possible to use it without getting into big trouble. You'll end up
defining a separate project, and using REST or GraphQL for
communication with Django. Additionally you have to throw webpack,
rollup, parcel, or any other bundler of your choice into the mix.
Which then won't like your non-admin-frontend.
What I ended with, and that has none of those disadvantages, is HTMX.
Keep your views, keep your templates, keep your
validations/validators, render everything serverside, just salt
the html templates with some HTMX attrs where needed. Works almost
perfectly, and even could be added incrementally.
If I would develop a better Django admin, I'd go for HTMX. (and I
tried Sockpuppet, Unicorn, and many others too.)
If it was for me, I even would add a neat HTMX integration to
Django core.
Cheers, Christian
--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/c29b745c-21d5-46c8-ab51-312b1a73114dn%40googlegroups.com.
-- Dr. Christian González https://nerdocs.at