Live data from Hacker News

Django 6

docs.djangoproject.com

101–110 of 192 posts

Re: Django 6

#101
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.

Ive been pleasantly surprised by claudes ability to handle a real-world rails codebase thats 5-10 years old in various spots. We dont do a lot of ruby magic / metaprogramming, and arent particularly 'railsy' in our patterns, but its had no issues figuring things out (even the light metaprogramming we _do_ use).

Re: Django 6

#102
post #96
post #73

Django has been one of the biggest reasons why web development has been so enjoyable to me. Whenever I switched to something else, I just felt too spoiled by everything that Django gives you. So I always ended up back with Django, and have no regrets at all specializing deep down that path.

That’s true as long as you are only talking about the backend. Frontend wise, Django is in the Stone Age. Look at Laravel or rails if you want a really complete full stack solution.

I feel very comfortable with Django on the frontend, what are you missing there? I usually use Tailwind or Bulma, with HTMX and AlpineJs. I feel like the experience can be very much React like, even if you leave out HTMX. The frontend game of Django really changed about 2 years ago (at least for me).

Re: Django 6

#103
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…

Flask is my go-to, but I've had great fun with Rust recently.

Django is the best thing in the world for writing Django apps. (No, I'm not trying to be funny there. If what you're doing looks like something Django would solve, it's fantastic.) But most of the things I do aren't Django apps, and ones you get off its happy path, you can be in for a world of hurt. Oh, you use SQLAlchemy everywhere else, and you'd like to use it in your Django app so that you can have one set of models and re-use the service logic you've built? Hah, too bad! Or you need your REST API output to look a very specific way? Have fun with that! Your auth model doesn't look just like Django's? Hope your LLM is good at smoothing that over!

The good side is that it's an opinionated framework that does a lot of research on your behalf and makes some great choices. The bad side is that you better agree with its opinions or you're in for a bad time.

Re: Django 6

#104
post #97
post #94

Earlier quoted context omitted.

I'm 32, but I noticed I started making similar mistakes around 28 or so. Occasionally I write out words which are completely wrong, but sound similar. It's as if one part of the brain is doing the thinking, and another one is "listening" to it and transcribing/typing it out, making mistakes. For a little while I was a bit worried, but I then realized nothing else had changed, so I've just gotten used to it and like t…

I suspect that as I got more vocabulary (and more languages) and started to actually speak the language more, I remember the "sound" of the word where I used to remember the spelling before. Like "it's" and "its" wasn't a problem before, but now I catch it somewhere in the text. At least I consistently write more than 50% of the articles nowdays. Languages are weird.

While I was writing the reply, I considered giving the absolutely exact same explanation, which I agree with, down to the example you gave.

Two examples in portuguese that always trip me up, and absolutely never used to before are (i) "voz" (voice) and "vós" (you); and (ii) "trás" (back) and "traz" (bring).

I also do a lot more code-switching.

Re: Django 6

#106
post #56
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…

On top of this, it's understandable to humans when reviewing generated code. There's no 2000-line FooBarAdmin component where bugs could be located. And if you're having it generate HTML templates, you can see exactly what backend model property/method was used without needing to follow the indirection through backends and prop drilling. And when you do create backends and React components, you can have a known-good…

One meeting with the original gevent author explains why it has not achieved broad acceptability.

It is rather sad for humanity that good ideas through-out time have been lost thanks to neurodiversity / social-acceptability constraints.

Re: Django 6

#107
post #75
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…

Now I've been dabbling outside of Django, I realised some of those things come from bits people don't think about much: INSTALLED_APPS and other bits in the settings provide a central registration point, from there the system where a project is made up of apps is enabled. Each app, has it's own migrations, models, templates and static files. This enables the whole ecosystem of parts that's easy to add, and makes it e…

It can be similar to WordPress plugins, but as problematic as WordPress plugins are, they went a lot farther in terms of ecosystem. While stored in the database, the WordPress plugins do the equivalent of INSTALLED_APPS, calling the code to register them.

Someone tried to make an ecosystem of Django apps, called Pinax, and it was pretty nice, but didn't pick up that much market share.

Re: Django 6

#108
post #62
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…

Ruby and Rails are even better candidates. CSP, Background workers, and many other features that Django still lacks have been standard offerings for sometimes 10+ years!

merb was going to do that with slices, and it seemed really promising at the time (cerca 2008), however it merged with Rails. I wish both merb and io.js had stayed independent. https://news.ycombinator.com/item?id=408011 https://news.ycombinator.com/item?id=8884128

Re: Django 6

#109
post #56
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…

On top of this, it's understandable to humans when reviewing generated code. There's no 2000-line FooBarAdmin component where bugs could be located. And if you're having it generate HTML templates, you can see exactly what backend model property/method was used without needing to follow the indirection through backends and prop drilling. And when you do create backends and React components, you can have a known-good…

I prefer gevent over explicit async so I'll die on that hill with you. The cooperative model adopted by Python async is... bad.

Re: Django 6

#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.

Post reply on HN