Django 6.0: The Next Generation

python backend django

Django 6.0 is targeted for late 2025. While 5.2 LTS provides stability, 6.0 will bring significant new features. Here’s what to expect based on the roadmap and community discussions.

Release Timeline

VersionExpected DateSupport End
Django 5.2 LTSApr 2025Apr 2028
Django 6.0Dec 2025Apr 2027
Django 6.1Aug 2026Dec 2027
Django 6.2 LTSApr 2027Apr 2030

Expected Features

Complete Async ORM

The async journey completes:

# Full async ORM support
async def get_user_data(user_id):
    user = await User.objects.aget(id=user_id)
    posts = await user.posts.all().afilter(published=True)
    
    async for post in posts:
        comments = await post.comments.acount()
        yield post, comments

All queryset methods with async variants:

Async Template Engine

Templates finally go async:

# Async template loading
template = await engine.aget_template('page.html')
rendered = await template.arender(context)

# Async template tags
{% await user.get_recent_activity %}

Native WebSocket Support

Built-in WebSocket handling without Channels:

# urls.py
from django.urls import websocket_path

urlpatterns = [
    websocket_path('ws/chat/', consumers.ChatConsumer),
]

# consumers.py
from django.websocket import WebSocketConsumer

class ChatConsumer(WebSocketConsumer):
    async def connect(self):
        await self.accept()
    
    async def receive(self, text_data):
        await self.send(text_data=f"Echo: {text_data}")

Improved Form Handling

Forms get more powerful:

# Form field groups with components
class ContactForm(forms.Form):
    name = forms.CharField()
    email = forms.EmailField()
    
    class Meta:
        field_groups = {
            'identity': ['name', 'email'],
            'message': ['subject', 'body'],
        }
{% for group in form.groups %}
  <fieldset>
    <legend>{{ group.name }}</legend>
    {% for field in group %}
      {{ field.as_field_group }}
    {% endfor %}
  </fieldset>
{% endfor %}

Admin Async Support

The admin goes async (finally):

@admin.register(Article)
class ArticleAdmin(admin.ModelAdmin):
    async def get_queryset(self, request):
        qs = await super().aget_queryset(request)
        # Async operations in admin
        return await qs.aselect_related('author')
    
    async def save_model(self, request, obj, form, change):
        obj.modified_by = request.user
        await obj.asave()

Background Tasks

Simple background task support without Celery:

from django.tasks import async_task

@async_task
async def send_welcome_email(user_id):
    user = await User.objects.aget(id=user_id)
    await send_email(user.email, "Welcome!")

# Usage
await send_welcome_email.schedule(user.id)

For simple cases—Celery still recommended for complex needs.

Database Features

Better PostgreSQL Support

# Native advisory locks
from django.db import connection

async with connection.advisory_lock('resource_key'):
    # Exclusive access to resource
    await process_resource()

Migration Improvements

# Concurrent index creation
class Migration(migrations.Migration):
    operations = [
        migrations.AddIndex(
            model_name='article',
            index=models.Index(fields=['title']),
            concurrently=True,  # No table lock
        ),
    ]

Typing Improvements

Better type hints throughout:

from django.db.models import QuerySet

class ArticleQuerySet(QuerySet['Article']):
    def published(self) -> 'ArticleQuerySet':
        return self.filter(published=True)

# models.py
class Article(models.Model):
    objects: ArticleQuerySet = ArticleQuerySet.as_manager()

Breaking Changes

Minimum Python 3.12

Django 6.0 will likely require Python 3.12+:

Removed Deprecations

Features deprecated in 5.0-5.2 will be removed:

python -Wd manage.py test

Template Syntax Updates

Some template adjustments for async:

Migration Preparation

Start Now

# 1. Check Django version
python -c "import django; print(django.VERSION)"

# 2. Check Python version (need 3.12+ for 6.0)
python --version

# 3. Run deprecation check
python -Wd manage.py check
python -Wd manage.py test

# 4. Update to latest 5.2.x
pip install Django==5.2.*

Async Readiness

If you’ll use async features:

# Audit sync-to-async boundaries
from asgiref.sync import sync_to_async, async_to_sync

# Plan view migration
async def new_async_view(request):
    # Async native
    data = await async_fetch()
    return JsonResponse(data)

# vs sync with wrapper
def old_sync_view(request):
    data = sync_function()
    return JsonResponse(data)

ASGI Server

Ensure ASGI deployment for async benefits:

# Verify you're using Uvicorn/Daphne/Hypercorn
# gunicorn won't give you async benefits

# asgi.py
import os
from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings')
application = get_asgi_application()

Should You Wait for 6.0?

Use 6.0 For

Stick with 5.2 LTS For

Final Thoughts

Django 6.0 is the async payoff. Years of incremental async additions culminate in a fully async-capable framework.

If you need async now, strategies exist. If you can wait, 6.0 will make it native and elegant.

The Django team continues their excellent track record of careful, backwards-compatible evolution. Trust the process.


The web framework for perfectionists with approaching deadlines.

All posts