Moving to Django 6.X

Fundor333 | | | Reading time 3 minutes | Word count 457

###


A long time ago I start my personal server in Django (a lot of the stuff from Django tricks were coded for my personal Django stuff) and some days ago I decide to upgrade to 6.1 or more. Why?

New things in 6.0 and 6.1

The main thing in Django 6.0 is the Django Tasks Frameworks   . Having a unique framework for the async task is a beautifull thing and made me clean a lot of code and make it more pythonic in multiple way.

I update my code for the Task Framework because I need it (I was using a Redis integration) but I want to change the backend without edit all my code so this is the best way to do it because the Django integration for multiple backend are easy to implement and update if needed.

Modern Time Gif

I also love the new Model Field Fetch Modes   . This is cleaner that my abuse of prefetch_related and add the FETCH_RAISE which raise error if you fetch data in the wrong section of your code. I don’t know if the last one is usefull for me but I do understand the needed for this.

The last thing I was waiting in Django are the Template Partials   . I use something similar a lot on GoHugo for this blog and I understand how a Django module can use it and why I want something so simple but also so usefull for not duplicate code in the frontend.

CatCoder

I also know that the template partials are usefull BUT aren’t Htmx1 so you can mixit with the Template Partials to make easyer manage your frontend and backend.

I also thing that the deprecation of PostgreSQL 14 is needed and can fix some vulnerability of my Django project.

So do I upgrade without problem?

Yes, I haven’t got any problem with the upgrade and the migration (PostgreSql14 was my db… Now I upgrade it a lot…) and all my dipendency are updated too…

In the end I am happy of the upgrade. I have less query in the db (I did a lot of not well optimize query) and the cleaner task code is a god sent for update or debugging. Ok I need to debug an async code (same problem of all the async code) but now I have a larger community for answer (yes, I can ask to an AI but I find a lot of the answer inside other blog or StackOverflow so, I can not use an AI, I don’t uset it) than than the old module I was using.

Do you upgrade or do you wait more time for the upgrade?


  1. Another blog post about Django and Htmx Django Table, Filter and Export With Htmx  ↩︎

Written by a human



Reference this post

Please reference this post with a link to this page. I prefer to be called Fundor333 (he/him) or Fundor333' Blog.

Learn more




Comments

To reply to this post, you can send a Webmention or you can toot me at [email protected]

With an account on the Fediverse or Mastodon, you can respond to this post. Since Mastodon is decentralized, you can use your existing account hosted by another Mastodon server or compatible platform if you don't have an account on this one. Known non-private replies are displayed below.

Learn how this is implemented here.


See Also