Live data from Hacker News

Django 6

docs.djangoproject.com

121–130 of 192 posts

Re: Django 6

#121
post #31

One thing Django has going for it is that the "batteries included" nature of it is perfect for AI code generation. You can get a working site with the usual featuers (admin panel, logins, forgot reset/password flow, etc) with minimal code thanks to the richness of the ecosystem, and because of the minimal code it's relatively easy for the AI to keep iterating on it since it's small enough to be understandable in cont…

This is generally true of all of these frameworks: Django, Laravel, rails, phoenix

Re: Django 6

#122
post #110

Congrats to the Django team! If anyone is curious, I've been maintaining a Docker Compose based Django + Celery + Postgres + Redis + esbuild + Tailwind starter app for years and just updated it for Django 6.0 at https://github.com/nickjj/docker-django-example . The only thing I haven't done is pre-configure the new CSP settings because I want to let that marinate a bit before putting it in as a default.

Thanks. Just went to bookmark it, but pinboard says I already did so in December of 2023.

Re: Django 6

#123

Django is awesome. I just prefer Rails because I prefer Ruby as a language. If you like Python then Django will get you very far.

Ruby is a far better language from a design standpoint and Rails is a better framework in both design and maturity. Sadly, Ruby is a domain-specific language for web backends these days. Most new startups pick Python and TS for their versatility.

Re: Django 6

#124
post #17
post #2

Show of hands for backend web services development - Who uses Django, Rails, or similar full-featured frameworks? Who uses micro-frameworks like Flask? Who uses enterprise Java, Jetty, Dot Net, etc.? Who uses an entirely Javascript stack? Who uses a non-traditional language that has become more web-servicey, like Go, Rust, or Swift? Who uses something so wildly untraditional that it's barely mentioned? OkCupid using…

One proxy might be to look at the upvote counts for each of their respective latest release HN posts. Eg, this post has ~50 (though only posted an hour ago) Rails 8 had ~550 https://news.ycombinator.com/item?id=41766515

It’s amazing how much rails devs feel the need to denigrate Django, feels like an inferiority complex.

Re: Django 6

#125

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

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?

Re: Django 6

#127
post #43

Earlier quoted context omitted.

why would you need batteries included? the ai can code most integrations (from scratch, if you want, so if you need something slightly off the beaten path it's easy

I think the logic can be applied to humans as well as AI: Sure, the AI _can_ code integrations, but it now has to maintain them, and might be tempted to modify them when it doesn't need to (leaky abstractions), adding cognitive load (in LLM parlance: "context pollution") and leading to worse results. Batteries-included = AI and humans write less code, get more "headspace"/"free context" to focus on what "really matte…

> As a very very heavy LLM user, I also notice that projects tend to be much easier for LLMs (and humans alike) to work on when they use opinionated well-established frameworks.

i have the exact opposite experience. its far better to have llms start from scratch than use batteries that are just slightly the wrong shape... the llm will run circles and hallucinate nonexistent solutions.

that said, i have had a lot of success having llms write opinionated (my opinions) packages that are shaped in the way that llms like (very little indirection, breadcrumbs to follow for code paths etc), and then have the llm write its own documentation.

Re: Django 6

#128
post #13

Can someone remind me how we ended up in the SPA era and why exactly? Was it about not seeing the loading spinner? Or there were more reasons to it?

For me, yes, it is. I make an app for myself, and I thought about making it a server-rendered app like you suggested. But it's just so much better in my opinion to do everything on the client side because it means that every interaction has zero latency, regardless of the quality of my internet (which is often bad).

Re: Django 6

#129
post #110

Congrats to the Django team! If anyone is curious, I've been maintaining a Docker Compose based Django + Celery + Postgres + Redis + esbuild + Tailwind starter app for years and just updated it for Django 6.0 at https://github.com/nickjj/docker-django-example . The only thing I haven't done is pre-configure the new CSP settings because I want to let that marinate a bit before putting it in as a default.

Hah, I used this a few years back on a project. Great work!

Re: Django 6

#130
post #71
post #31

One thing Django has going for it is that the "batteries included" nature of it is perfect for AI code generation. You can get a working site with the usual featuers (admin panel, logins, forgot reset/password flow, etc) with minimal code thanks to the richness of the ecosystem, and because of the minimal code it's relatively easy for the AI to keep iterating on it since it's small enough to be understandable in cont…

I have tried both Django and Rails for this, and honestly, very surprisingly, Rails did much better, at least with Claude Code. This is for a rewrite of an old .net application. Claude nailed it almost perfectly with Rails, but struggled with Django. YMMV.

[dead]
Post reply on HN