Live data from Hacker News

Django 6.0 beta 1 released

djangoproject.com

41–50 of 60 posts

Re: Django 6.0 beta 1 released

#41
post #18

I would really like if there was a way to integrate with non-Python ecosystems. I know this is way outside the scope of Django, but I still have to mention it. The moment you want to rely on a JavaScript library or generate some CSS you pretty much have to pull in Node and NPM because there just so much value in those ecosystems. And then you have to put up with a second ecosystem with its own build system and someho…

DRF and Django Ninja do this? For magically tying the ecosystems, I recommend generating client side http libraries from the OpenAPI schema.

Re: Django 6.0 beta 1 released

#42
post #15

Earlier quoted context omitted.

What're some DB query performance issues you've run across in the past and how did you resolve them?

People generally don’t take the time to learn the framework and miss out on the tooling it provides. select_related for example. If I had a dollar for every project I’ve been hired to work on that didn’t use it, well, I actually do. Also, people in general don’t seem to be able to do more than very basic SQL, so creating views is seen as a little known performance “trick”. In general, people who don’t read the manual…

Ah yes. That’s the one thing I need to teach everyone when they’re new to Django. I was wondering if there were other quirks to the ORM beyond avoiding N+1 queries.

Re: Django 6.0 beta 1 released

#43
post #8

I love Django, and the new `tasks` framework to replace `celery` (/whatever processor you prefer) looks great. I've only recently come back to it, and I do hope they continue to add more batteries to their "batteries included" framework over time. I was surprised just how much stuff I had to add to my little project that will require updating _outside_ the main framework, eg.: * django-components for little template…

I'm curious to see how you successfully got working well the types as I'm lost in the nightmare for a few days.

Re: Django 6.0 beta 1 released

#44

Earlier quoted context omitted.

You can always use pyenv to install any Python on any mainstream Linux. I only use pyenv Python to develop on any laptop or any server. My dev laptop is still Ubuntu 22.04 and I have any Python from 2.7 to 3.14 . https://github.com/pyenv/pyenv Simple Python version management

Wow I had no idea about that, thanks!

Better yet, uv:

https://docs.astral.sh/uv/guides/install-python/

Re: Django 6.0 beta 1 released

#45
post #18

I would really like if there was a way to integrate with non-Python ecosystems. I know this is way outside the scope of Django, but I still have to mention it. The moment you want to rely on a JavaScript library or generate some CSS you pretty much have to pull in Node and NPM because there just so much value in those ecosystems. And then you have to put up with a second ecosystem with its own build system and someho…

> The moment you want to rely on a JavaScript library or generate some CSS you pretty much have to pull in Node and NPM because there just so much value in those ecosystems.

Perhaps I'm missing details here but isn't that a reality with non-js web frameworks? The Phoenix docs mention esbuild and npm right off the bat:

https://hexdocs.pm/phoenix/asset_management.html

Laravel expects node, npm, and vite at the very least:

https://laravel.com/docs/12.x/vite

Re: Django 6.0 beta 1 released

#46
post #18

I would really like if there was a way to integrate with non-Python ecosystems. I know this is way outside the scope of Django, but I still have to mention it. The moment you want to rely on a JavaScript library or generate some CSS you pretty much have to pull in Node and NPM because there just so much value in those ecosystems. And then you have to put up with a second ecosystem with its own build system and someho…

You can just add any frontend framework and bundler you like with django. Django just serves HTML templates and you can load your JS libraries in your HTML template.

Yeah you can't use create-react-app or something. You have to do a little bit more work to set it up. But it is certainly very doable.

Re: Django 6.0 beta 1 released

#49

Earlier quoted context omitted.

Ops here, using System Python is always asking for trouble, just put Django into a container and call it a day.

What kind of trouble? That's all I've ever used for the last 15 years of my professional Django work and never had any issues...

Incompatibility with Python version in current LTS Ubuntu sounds like an issue to me.

FWIW I used to be fine with just dealing with system Python, like you, but recent tools like uv make it so easy and convenient to isolate interpreters and dependencies per project that I'm just not going back.

Re: Django 6.0 beta 1 released

#50
post #43
post #8

I love Django, and the new `tasks` framework to replace `celery` (/whatever processor you prefer) looks great. I've only recently come back to it, and I do hope they continue to add more batteries to their "batteries included" framework over time. I was surprised just how much stuff I had to add to my little project that will require updating _outside_ the main framework, eg.: * django-components for little template…

I'm curious to see how you successfully got working well the types as I'm lost in the nightmare for a few days.

In `pyproject.toml`:

    "django-stubs>=5.2",
    "django-stubs-ext>=5.2.2",
In `settings.py`, add:

    import django_stubs_ext

    django_stubs_ext.monkeypatch()

With that, it seems _mostly_ OK, though I had to toggle off some of basedpyright's typechecking.
Post reply on HN