← Back to context

Comment by zelphirkalt

6 days ago

Django is a modern web framework. It simply doesn't follow the hype around JS SPAs. However, if you really want to, you can of course still render static content + serve a JS framework like Vue to the client, and then have dynamic widgets rendered on the client side.

If you want to build an SPA anyway, then Django is not the right framework to start with though.

I use Django + DRF for SPA. SPA bundle is served from an nginx container, but I don't see any problem building it into the django image either.

What is the right framework for building SPAs?

  • Probably one, whose basic idea is to make an SPA. Django has all the tools for making a multi page website/application, which you are then not using. There is probably a framework that is based on the idea of making an SPA and that doesn't include the other stuff.

its not only about SPA vs non-SPA.

For example, there is a nice component library, shadcn, of course you can somehow embed it into the project, but to use it productively, you must have a bundler, which is outside of Django ecosystem.

Also, if you take a look at AI generated content, a lot of them are optimized for outputting JS for frontend, try embedding it in Django project, its non-trivial