logoalt Hacker News

willahmadyesterday at 10:04 PM4 repliesview on HN

Django is awesome, but I wish there was an easy way to use modern web frameworks with it.

A lot of times it's either through Nextjs/Nuxtjs + Django as an API or complex bundling process which requires a file where you register bundle versions/manifests then another build process which embeds them into template

both are so complex


Replies

zelphirkaltyesterday at 11:12 PM

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.

show 1 reply
frdyyesterday at 10:35 PM

Have you tried Django with Inertia.js?

https://inertiajs.com/

stevexyesterday at 10:11 PM

Django + AlpineJS + HTMX is pretty nice.

show 2 replies
mushufasayesterday at 10:25 PM

Yes the API process is very complex and then you have to have a team with proficiency in two parallel sets of web technologies -- python vs javascript. That said, the fact that you can go that route means that Django can be a good pick for early-stage projects where you don't need a frontend framework, because there's the optionality to add it later if your project really requires it.