Skip to content

/changelogs/django/django-5-2-to-6-1

Django 5.2 to 6.1: breaking changes and upgrade notes

The commands on this page have not been executed by our verification runner yet.updated 2026-10-20
tool
Django
versions
5.2 → 6.1

Django 6.0 was released on 2025-12-03 and 6.1 on 2026-08-05. Coming from 5.2 LTS, check the new minimum Python version (3.12), the DEFAULT_AUTO_FIELD default, and the APIs removed after their deprecation period. Django 6.1's mainstream support ends in April 2027 and extended support in December 2027.

Breaking changes in 6.0

  • Python 3.12+ only. Django 6.0 supports Python 3.12, 3.13 and 3.14.
  • DEFAULT_AUTO_FIELD defaults to BigAutoField. Projects created with older templates already set it. If yours never set it and its migrations use AutoField, set DEFAULT_AUTO_FIELD = "django.db.models.AutoField" (or the app's default_auto_field) to avoid new migrations.
  • forms.URLField treats values without a scheme as https://; the transitional FORMS_URLFIELD_ASSUME_HTTPS setting is gone.
  • Removed after deprecation: positional arguments to BaseConstraint, the DjangoDivFormRenderer and Jinja2DivFormRenderer renderers, cx_Oracle support (use oracledb), Prefetch.get_current_queryset(), overriding existing URL converters with register_converter(), and more.
  • Databases: MariaDB 10.6+ is required; the PostgreSQL backend no longer uses CASCADE when dropping a column.
  • Email: Django moved to Python's modern email API; undocumented EmailMessage internals changed.

New in 6.0

  • Built-in Content Security Policy support.
  • Template partials for reusable named fragments inside a template.
  • A background tasks framework (django.tasks).

6.1

  • Supports Python 3.12, 3.13, 3.14 and, from 6.1.3, 3.15.
  • Calendar versioning (DEP 20): the releases planned as Django 7.0 and 7.1 become Django 2028 and 2029, and RemovedInDjango70Warning is renamed RemovedInDjango2028Warning. Update filterwarnings rules that mention the old class name.
  • New: model field fetch modes, database-level on_delete options for ForeignKey, and mailers.

Upgrade path

  1. On 5.2, run tests with python -Wd manage.py test and fix every RemovedInDjango60Warning.
  2. Move to Python 3.12+ and upgrade third-party packages to versions that support Django 6.
  3. Upgrade to 6.0, run python manage.py makemigrations --check to catch migrations caused by new defaults, then upgrade to 6.1.

Sources