Django Is Getting a Big Update

Manpreet Singh
2 min readJun 22, 2022

Welcome back! Django is an awesome web framework for Python, if you’re new to Django, check out the link below to learn more about it:

Django is now getting another massive update, this is the Django 4.1 update! If you want to check out their release log for this update, here is a link to it:

https://docs.djangoproject.com/en/4.1/releases/4.1/

So, let’s take a look at some of the changes with this update!

Validation Constraints

There are some updates with the validation of constraints which are now checked during model validation.

Asynchronous handler updates

This new version of django brings some new improvements for class-based views! Here is an example from their release log:

import asyncio
from django.http import HttpResponse
from django.views import View

class AsyncView(View):
async def get(self, request, *args, **kwargs):
# Perform view logic using await.
await asyncio.sleep(1)
return HttpResponse("Hello async world!")

There were some minor features added within this update as well:

  • Admin history view is paginated
  • Widget wrappers can now link to object change forms
  • Admin dark mode css variables are applied separate in blocks

There are also a ton of other changes within this update as well! Do you plan on updating to this version of Django? I would love to hear your thoughts about this!

Thanks So Much!

If you’re new to your programming journey, feel free to check out some of the books that I’ve written, my goal is to teach you how to code without you getting bored:

Thanks so much for your support!

--

--