Live data from Hacker News

Django 6

docs.djangoproject.com

181–190 of 192 posts

Re: Django 6

#181

Earlier quoted context omitted.

It’s very likely that project is a security nightmare. Just an OS old enough to support 2.7 would be problematic.

I just verified. You can install Python 2.7 on an up to date Windows install as well as an up to date Linux install. Python 2.7 hasn't received security updates (or really any updates) in years, but that does not mean it can't still work on an up to date OS.

2.7 gave me problems last time I tried to install it from source on redhat. Something about ssl incompatibility.

Re: Django 6

#182

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.

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

Re: Django 6

#183

Earlier quoted context omitted.

Glad to hear that works for you. But nothing of what you are mentioning is part of Django, nor an official package,etc. And I’m not going to get into the details of whether that stack would work for non backend developers, developers working on medium/large projects and/or medium/large teams. That’s a separate and unrelated discussion. But compare what Django brings you (Stone Age templating system and that’s it) to…

Nitpicking...

Great argumentation…

Re: Django 6

#184
post #155
post #138

Earlier quoted context omitted.

"Fun" isn't the same thing as "functional." I remember having great fun in QuickBASIC. And my son enjoys Scratch. Django code is much more fun to work with than Node, but I can't imagine developing something competitive in it in 2025 to what I'm developing in Node. Node is a pain in the butt, but at the end of the day, competitiveness is about what you deliver to the user, not how much fun you have along the way. * I…

The lithium-ion battery analogy seems fitting: When we're not careful about sourcing those modern batteries from a trustworthy supply-chain, they tend to explode and injure the user.

It is, and intentionally so.

NiCd batteries could also sit on a shelf forever, holding their charge. They had virtually no self-discharge, which was super-convenient.

They came in standard form factors (AA, AAA, 9V, etc.).

I really liked NiCd batteries.

But realistically, you couldn't sell a phone or laptop in 2025 which ran on them.

Re: Django 6

#185
post #144
post #138

Earlier quoted context omitted.

"Fun" isn't the same thing as "functional." I remember having great fun in QuickBASIC. And my son enjoys Scratch. Django code is much more fun to work with than Node, but I can't imagine developing something competitive in it in 2025 to what I'm developing in Node. Node is a pain in the butt, but at the end of the day, competitiveness is about what you deliver to the user, not how much fun you have along the way. * I…

You spell out a lot of examples, but all of them are purely technical. What is it that you can deliver to the user using Node that you cannot deliver using Django? This is a genuine question.

There is nothing you can't do, given a Turing-complete language.

That doesn't make it reasonable or convenient to do so, though.

Re: Django 6

#186

Good job, template partials looks like a nice improvement ! That being said, the current state of type annotations is a pain: django-stubs works on mypy but with a plugin (and mypy is slow as hell), django-types is a fork a django-stubs that works on pyright but is usually out of sync and pylance ships its owned stubs forked from django-types. My biggest wish for next Django release would be that they finally ship ty…

I have the same issues in Zed and VS Code, but somehow everything works in PyCharm. Even all the double underscore nonsense in QuerySets that I've never seen work enywhere else. I don't use it very often because I mostly work from my potato of a laptop these days, but when I really just need to Get Shit Done, I sacrifice 10 browser tabs to reclaim some RAM and open PyCharm.

Re: Django 6

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

Great for simple CRUD apps but it falls apart with more complex enterprise requirements.

Re: Django 6

#188

Good job, template partials looks like a nice improvement ! That being said, the current state of type annotations is a pain: django-stubs works on mypy but with a plugin (and mypy is slow as hell), django-types is a fork a django-stubs that works on pyright but is usually out of sync and pylance ships its owned stubs forked from django-types. My biggest wish for next Django release would be that they finally ship ty…

I have the same issues in Zed and VS Code, but somehow everything works in PyCharm. Even all the double underscore nonsense in QuerySets that I've never seen work enywhere else. I don't use it very often because I mostly work from my potato of a laptop these days, but when I really just need to Get Shit Done, I sacrifice 10 browser tabs to reclaim some RAM and open PyCharm.

Pycharm does not have good type checking. It has the best type inference, but its type checking is very basic. It’s not strict, that’s why you don’t see a lot of errors. When complex types don’t much, it won’t complain.

Re: Django 6

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

Both Laravel and Django use Active Record, great for CRUD but I have yet to see a project where it worked with more complex domains.

Re: Django 6

#190
post #102

Earlier quoted context omitted.

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

Glad to hear that works for you. But nothing of what you are mentioning is part of Django, nor an official package,etc. And I’m not going to get into the details of whether that stack would work for non backend developers, developers working on medium/large projects and/or medium/large teams. That’s a separate and unrelated discussion. But compare what Django brings you (Stone Age templating system and that’s it) to…

Wait, When did live reload stop working for Django? While I understand its not out of the box, there are plenty of packages to choose from

https://djangopackages.org/grids/g/asset-managers/ , django-cotton/django-component. Partials are supported now, etc.

Post reply on HN