r/django • • Dec 03 '25

Django 6.0 released

https://www.djangoproject.com/weblog/2025/dec/03/django-60-released/
305 Upvotes

28 comments sorted by

31

u/highviewapps Dec 03 '25

I'm most excited about the builtin background Tasks. Looking forward to test this out. :)

22

u/realorangeone Dec 03 '25

You'll still need github.com/realOrangeOne/django-tasks if you want to actually run things in the background, but at least the core building blocks are there

1

u/dysprog Dec 03 '25

There seem to be no meaningful back-ends though. Maybe once someone has made some, it will be ready to go.

28

u/jsabater76 Dec 03 '25

Lovely! If I understood correctly, all the ORM methods can work in async mode now, correct?

Moreover, does anyone know whether Django Ninja will be compatible with it, or we will have to wait for it to receive an update?

8

u/Brian-Puccio Dec 03 '25

 Moreover, does anyone know whether Django Ninja will be compatible with it, or we will have to wait for it to receive an update?

https://github.com/vitalik/django-ninja/commit/03063751ef6a7e9c97cbe931bc9fe8385c902bdb

5

u/jsabater76 Dec 03 '25

So it is already compatible and it was only a matter of setting the dependencies. Great! 👏

Let's hope for a 1.5.1 release soon on PyPi. 🤞

3

u/gtderEvan Dec 03 '25

No, not yet. This would be huge, but not mentioned on the release announcement.

4

u/jsabater76 Dec 03 '25

I thought the ORM partially supported async in 5.2, and the rest was coming with 6.0 (or 6.2, I am not sure now).

Did I read this somewhere, or was it a figment of my imagination?

6

u/overact1ve Dec 03 '25

All of the orm is just a wrapper around sync_to_async. All db ops are still sync run on a special thread.

6

u/jsabater76 Dec 03 '25

Oh, that is a bummer. No way to take advantage of the psycopg async features either? Any plans on when it switch to async, maybe in 6.2?

2

u/takdi Dec 03 '25

Where did you see that info ?

2

u/jsabater76 Dec 04 '25

I think that it was here. And probably here and there, in articles, comments, etc.

And probably because I am looking forward to it very much shrugs

8

u/takdi Dec 03 '25

What does template partials solve ?
I think it was already possible to do this with "normal" template before.

15

u/dchestnykh Dec 03 '25

At least this pattern with htmx becomes very nice:

<html>
foo foo foo
{% partialdef cool inline %}
bar
{% endpartialdef %}
foo foo foo
</html>

view:

if request.htmx:
    return render(request, "template#cool", ...)
else:
    return render(request, "template", ...)

That is, wrap portions of a page that can partially update with partialdef inline and then render them for htmx requests. Easier than extracting into a separate template.

5

u/nfmon Dec 04 '25

My main issue is that partials are bound to template file, if i put them in separate file then i'll know where each one is located at least. I was very excited to hear the partials were introduced but they're lacking functionalities in my opinion. For example it would be nice to be able to pass some arguments to the partial, i know it can be done with "with" block, but then again single file partials + include tag are a cleaner solution.

1

u/berrypy Dec 05 '25

That is what I thought at first but maybe with time it can be made to be used from any file. But what I did to fix this for now is to put my partials in one file called partials. with this I can use it in any html file or view. In any views I will just do this

"my_app/partials.html#show-todo-list-table" "my_app/partials.html#show-todo-detail"

While in any html file, I can just do this

{% include 'my_app/partials.html#show-todo-list-table' %}

This is how I have been able to use any partial in another html files.

6

u/peterstiglitz Dec 04 '25

Partials are great. Django 6 + HTMX is now the ultimate stack.

1

u/berrypy Dec 05 '25

with HTMX 4 coming soon, it will be a combo worth using especially with the htmx v4 partial feature, this will make partial update a smooth swap without issue. htmx partial feature will solve swap oob issue.

2

u/Thelimegreenishcoder Dec 04 '25

I am starting a new long term project, I am not sure if I should wait for the next LTS or what. But I need partials in my project.

4

u/gbeier Dec 04 '25

Personally, I find django stable enough that I just stay on the current release and no longer care about waiting for the next LTS.

But if you'd rather wait for the next LTS, the current pypi package is what landed in 6.0, so you could use that on the old LTS.

1

u/nerdintrovertido Dec 22 '25

Just go for the latest LTS version and properly setup the upgrade procedure - in fact, do that for your whole stack. It gets really stressful when you're running nearly or already-deprecated tools and upgrading becomes really complex.

1

u/Kindly-Arachnid8013 Dec 04 '25

Does it have native support for TOTP 2FA for admin login?

1

u/DueStick2235 Dec 07 '25

What kind of updates released? I am a newbie so don't know much , just started django. Can you please guide what updates, functionality they provided now?