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


Am 15.10.21 um 08:52 schrieb Warren Havemann:
Hi everyone,

I've been contemplating the development of an SPA version of admin either in Angular, React, Vue or even Flutter... preferably in Angular due to it's data binding approach.

The idea is to serve the SPA from Django, dynamically generating it so that the great model based apps that one can create with the current admin site can be dynamically generated in a similar way, but as an SPA.  Why SPA.. just to enable a better, more powerful user experience without the round trips and page reloads.

Hoping it will in the same way form a RAD tool for SPA development with a Django back-end.

If we get really smart, we may be able to make it theme-able.

I have messaged the django dev group as I have had a look at the work that may be involved and I believe that if we we're to succeed in making this a standard addition to django as an admin alternative, we make have to accommodate it in the code a bit... there may be a bit of refactoring of the admin code.

Just wondering if anyone would be up for joining me in creating something like this?... or if you know of an existing project trying to do this?

Thanks
Warren

--
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-developers+unsubscr...@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 <https://groups.google.com/d/msgid/django-developers/c29b745c-21d5-46c8-ab51-312b1a73114dn%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Dr. Christian González
https://nerdocs.at

--
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-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/e11b61db-144a-30e3-9a21-b76667a1b921%40nerdocs.at.

Reply via email to