Django 5.2 LTS or 6.1: Which Should You Upgrade To?

MicroPyramid 18 min read

Django 5.2 LTS or 6.1: Which Should You Upgrade To?

Short answer: If you run Django 4.2, 5.0 or 5.1, upgrade to Django 5.2 LTS now: it has security support until April 2028, it still runs on Python 3.10 and 3.11, and it is the stop on the way to 6.x anyway. If you are already on 5.2, move on to Django 6.1 once you run Python 3.12 or newer, PostgreSQL 15 or newer (or MySQL 8.4, or MariaDB 10.11) and packages that support it; otherwise stay on 5.2 and plan one move to Django 6.2 LTS, due in April 2027, during 2027.

Both answers lead to the same place. Django 6.2 LTS, supported until April 2030, is the next long-term release, and everything Django 6.0 and 6.1 change has to be dealt with before you reach it either way. So the real choice is timing: do the 6.x work now and take 6.2 as a small step, or stay on the LTS and do it all in 2027. Dates and versions below come from djangoproject.com and PyPI, checked on November 22, 2026, and we ran every code example on Django 5.2.19, 6.0.10 and 6.1.3. To see what breaks in your own code, paste your settings, models and templates into our Django upgrade checker, which lists the changes for 5.2 LTS, 6.0 or 6.1.

When does support end for Django 4.2, 5.0, 5.1, 5.2, 6.0 and 6.1?

Django 4.2, 5.0 and 5.1 no longer get security fixes. Django 5.2 LTS gets them until April 2028, 6.0 until April 2027 and 6.1 until December 2027.

Django Released Bug fixes until Security fixes until Latest release
4.2 LTS April 3, 2023 December 4, 2023 April 7, 2026 (ended) 4.2.30
5.0 December 4, 2023 August 7, 2024 April 2, 2025 (ended) 5.0.14
5.1 August 7, 2024 April 2, 2025 December 3, 2025 (ended) 5.1.15
5.2 LTS April 2, 2025 December 3, 2025 (ended) April 2028 5.2.19
6.0 December 3, 2025 August 4, 2026 (ended) April 2027 6.0.10
6.1 August 5, 2026 April 2027 December 2027 6.1.3
6.2 LTS Due April 2027 December 2027 April 2030 Not released yet

Sources: Django's download page (the supported versions and roadmap tables), the release notes for 4.2, 5.0, 5.1, 5.2, 6.0 and 6.1, and the 6.2 roadmap, which plans the final release for April 6, 2027.

  • "Bug fixes" is what Django calls mainstream support: security fixes plus fixes for data loss, crashes, major bugs in new features and regressions. After that comes extended support, with security and data-loss fixes only. Django 5.2 LTS has been in extended support since December 3, 2025.
  • Django 6.0 is a stop, not a place to stay. Its security support ends in April 2027, the same month 6.2 is due, so teams on 6.0 should move to 6.1 now.
  • Other deadlines may come first. Python 3.10 reached end of life on October 1, 2026 and PostgreSQL 14 on November 12, 2026. Paste your requirements and Dockerfiles into our end-of-life checker to see the dates for everything you run.

What does choosing Django 5.2 LTS or 6.1 mean in practice?

Django 5.2 LTS gives you the longest runway on the Python and database you already run. Django 6.1 gives you bug fixes and newer features now, and a short last step to 6.2, but it needs newer Python and database versions first.

Django 5.2 LTS Django 6.1
Security fixes until April 2028 December 2027
Bug fixes Ended December 3, 2025 Until April 2027
Python 3.10 to 3.14 3.12 to 3.15 (3.15 from 6.1.3)
PostgreSQL 14 or newer 15 or newer
MySQL 8.0.11 or newer 8.4 or newer
MariaDB 10.5 or newer 10.11 or newer
SQLite 3.31.0 or newer 3.37.0 or newer
Next required move To 6.2 LTS by April 2028, through 6.0 and 6.1 To 6.2 LTS by December 2027
Time between 6.2's release and that deadline About 12 months About 8 months
Key packages in our check (below) All ready All except django-celery-beat

Sources: Django's download page, the Python version FAQ, the 5.2 databases reference and the 6.1 release notes.

  • Choosing 5.2 LTS keeps Python, the database and most of your packages where they are, and gives you until April 2028. The catch: it only gets security fixes now, and the later move to 6.2 crosses three feature releases (6.0, 6.1 and 6.2), each with its own removals.
  • Choosing 6.1 does the 6.0 and 6.1 work now, while 6.1 still gets bug fixes, and brings Django's newest features: built-in Content Security Policy support, template partials and a background tasks framework from 6.0, and in 6.1 fetch modes, which can reduce most "N+1 query" problems to two queries. The catch: Python 3.12 and a newer database come first, and you must move to 6.2 between its release in April 2027 and December 2027.
  • The total work is the same. Every change in 6.0 and 6.1 has to be made before 6.2 whichever route you take, and Django's deprecation policy removes no deprecated features in an LTS release such as 6.2, so 6.1 to 6.2 is normally the lightest kind of Django upgrade.

What changes after Django 6.2?

Django 6.2 is the last release numbered the old way. From January 2028, Django ships one release a year, named after the year (Django 2028, then Django 2029), and every release gets three years of support: one year of bug fixes, then two years of security fixes. There are no separate LTS releases after 6.2.

  • 6.2 LTS is the next stop for both choices. It is due in April 2027 with security support until April 2030. Django 2028 arrives in January 2028, three months before 5.2's support ends, which is too tight to treat it as the next step from 5.2.
  • What 6.0 and 6.1 deprecate is removed in Django 2028, which takes the place of 7.0. The change most projects will notice is the new MAILERS setting, which replaces EMAIL_HOST and the other EMAIL_* settings.
  • 6.2 is set to need PostgreSQL 16 or newer. The in-development 6.2 release notes drop PostgreSQL 15, whose upstream support ends on November 11, 2027. If you are upgrading the database for 6.1, go to 16 or newer and skip a second move.
  • Python 3.12 stays the floor. Django 6.2 supports Python 3.12 to 3.15.

Sources: Django's release process, the download page, "Adopting calendar versioning" in the 6.1 release notes and the Python version FAQ.

Which Python version do Django 5.2, 6.0 and 6.1 need?

Django 5.2 supports Python 3.10 to 3.14. Django 6.0 and 6.1 need Python 3.12 or newer, and the Django 6.0 release notes confirm that the 5.2 series is the last to support Python 3.10 and 3.11.

Python Security fixes until Django 5.2 Django 6.0 Django 6.1 Django 6.2 LTS
3.10 October 1, 2026 (ended) Yes No No No
3.11 October 2027 Yes No No No
3.12 October 2028 Yes Yes Yes Yes
3.13 October 2029 Yes Yes Yes Yes
3.14 October 2030 Yes, from 5.2.8 Yes Yes Yes
3.15 October 2031 No No Yes, from 6.1.3 Yes

Sources: Django's Python version FAQ and the Python versions page.

  • Move Python before Django. On Python 3.10 or 3.11, upgrade Python while you are still on 5.2 and release it on its own. Our guide to upgrading from Python 3.10 explains why 3.14 is the version to pick.
  • pip will not warn you. On Python 3.11, pip does not offer Django 6.x at all, and an unpinned requirement quietly installs 5.2.19. Python 3.10 holds back other packages too: in our test, pip settled on django-allauth 65.19.7 and Wagtail 8.0.1, because their latest releases need Python 3.11.
# On Python 3.11.18 (pip 26.3), Django 6.x is not offered at all:
python -m pip install "Django==6.1.3"
# ERROR: No matching distribution found for Django==6.1.3

# and an unpinned requirement settles on the 5.2 series without a warning:
python -m pip install Django
# Successfully installed Django-5.2.19 asgiref-3.13.0 sqlparse-0.6.1

What breaks when you move from Django 5.2 to 6.0?

Django 6.0 removes what 5.0 and 5.1 deprecated, and changes one default that touches most older projects. If your tests already run clean with warnings switched on in 5.2, most of this is done.

  • DEFAULT_AUTO_FIELD now defaults to BigAutoField. If your settings never set it, makemigrations on 6.0 wants to change every auto-created primary key to a 64-bit integer. Django has flagged this with the models.W042 warning since 3.2. Pin AutoField first, and convert keys later as a separate, planned change.
  • Python 3.12 and MariaDB 10.6 become the minimums. PostgreSQL stays at 14 or newer and MySQL at 8.0.11.
  • Removed, and now an error: the check argument of CheckConstraint (use condition), positional arguments to Model.save(), format_html() called without values, a ModelAdmin.lookup_allowed() override without request, the DjangoDivFormRenderer and Jinja2DivFormRenderer renderers, and the ChoicesMeta alias (now ChoicesType).
  • forms.URLField assumes https:// for input typed without a scheme, where 5.2 assumed http://. Nothing fails; the stored value changes.

The full list is in the Django 6.0 release notes. The examples below show the most common ones, each run on 5.2.19, 6.0.10 and 6.1.3.

from django.db import models
from django.db.models import Q
from django.utils.html import format_html

# Before: each line runs on Django 5.2.19 with a RemovedInDjango60Warning;
# on 6.0.10 and 6.1.3 each one raises TypeError
models.CheckConstraint(check=Q(total__gte=0), name="total_gte_0")
format_html("<b>Maintenance tonight</b>")
order.save(False, False, None, ["status"])

# After: runs on 5.2.19, 6.0.10 and 6.1.3 with no warnings
models.CheckConstraint(condition=Q(total__gte=0), name="total_gte_0")
format_html("<b>{}</b>", "Maintenance tonight")
order.save(update_fields=["status"])
# settings.py
# Django 6.0 changed this default from AutoField to BigAutoField. Without this
# line, makemigrations on 6.0.10 and 6.1.3 wants to alter every auto-created
# primary key from older migrations. Keep today's keys and convert them later.
DEFAULT_AUTO_FIELD = "django.db.models.AutoField"

# forms.py
# "example.com" is cleaned to "http://example.com" on 5.2.19 (with a warning)
# and to "https://example.com" on 6.0.10 and 6.1.3. Say which one you want:
website = forms.URLField(assume_scheme="https")

What else breaks in Django 6.1?

Django 6.1 removes what 5.2 deprecated, raises the database minimums, and changes a few behaviours, one of which fails without any error. The full list is in the Django 6.1 release notes.

  • Database minimums rise to PostgreSQL 15, MySQL 8.4, MariaDB 10.11 and SQLite 3.37.0. PostgreSQL 14 reached end of life on November 12, 2026, and the release notes put the end of upstream support for MySQL 8.0 in April 2026, so this move is due anyway.
  • ordering= on the PostgreSQL ArrayAgg, JSONBAgg and StringAgg aggregates is now ignored, silently. In our test on 6.1.3, there was no error and no warning: the ORDER BY simply disappeared from the SQL, so the values come back in whatever order the database picks. Rename it to order_by=, which works from 5.2.
  • finders.find(all=True) raises TypeError. The argument is now find_all.
  • fail_silently=True together with connection= in send_mail() and the other mail functions raises TypeError. Pass fail_silently to get_connection() instead.
  • Combined querysets use the model's default ordering. union(), difference() and intersection() raise DatabaseError when a field in Meta.ordering is not among the fields you select with values(). Add .order_by() after combining.
  • Older signed cookies are rejected. On 6.1, get_signed_cookie() refuses cookies signed by any 4.2 release, or by 5.2 and 6.0 before the security releases of June 3, 2026 (5.2.15 and 6.0.6). Set SIGNED_COOKIE_LEGACY_SALT_FALLBACK = True until those cookies have expired.
  • The admin's markup changes. Change forms put fields below their labels, and the breadcrumbs become an <ol> list instead of a <div>. Check any admin templates and CSS you have overridden.
  • New deprecations to plan for. The EMAIL_* settings (replaced by MAILERS), select_related() with no arguments, values_list(flat=True) without a field name and transaction.savepoint() (renamed savepoint_create()) all warn on 6.1 and are removed in Django 2028. MAILERS and savepoint_create() do not exist in 5.2, so make those changes after the upgrade.
from django.contrib.postgres.aggregates import ArrayAgg
from django.contrib.staticfiles import finders
from django.core import mail

# Before: runs on Django 5.2.19 and 6.0.10 (the first two lines warn). On 6.1.3:
# TypeError: find() got an unexpected keyword argument 'all'
paths = finders.find("css/site.css", all=True)
# No error and no warning on 6.1.3, but the ORDER BY is gone from the SQL
by_status = Invoice.objects.values("paid").annotate(numbers=ArrayAgg("number", ordering="-total"))
# TypeError: fail_silently cannot be used with a connection. Pass fail_silently to get_connection() instead.
mail.send_mail("Invoice", "Attached.", "billing@example.com", ["ap@example.com"],
               fail_silently=True, connection=mail.get_connection())

# After: runs on 5.2.19, 6.0.10 and 6.1.3 (6.1.3 warns that get_connection()
# and the connection argument are deprecated: plan the move to MAILERS)
paths = finders.find("css/site.css", find_all=True)
by_status = Invoice.objects.values("paid").annotate(numbers=ArrayAgg("number", order_by="-total"))
connection = mail.get_connection(fail_silently=True)
mail.send_mail("Invoice", "Attached.", "billing@example.com", ["ap@example.com"],
               connection=connection)
# Invoice has Meta.ordering = ["-id"]; each part clears its own ordering
unpaid = Invoice.objects.filter(paid=False).order_by().values("number")
paid = Invoice.objects.filter(paid=True).order_by().values("number")

# Before: works on 5.2.19 and 6.0.10; on 6.1.3, when the queryset is evaluated:
# DatabaseError: ORDER BY term does not match any column in the result set.
numbers = list(unpaid.union(paid))

# After: clear the default ordering after combining. Runs on all three.
numbers = list(unpaid.union(paid).order_by())


# settings.py, only if you use set_signed_cookie() and get_signed_cookie():
# accept cookies signed by older releases until they expire, then delete the
# line (6.1.3 warns that the setting is deprecated, and Django 2028 removes it)
SIGNED_COOKIE_LEGACY_SALT_FALLBACK = True

Do DRF, Celery, django-allauth, django-storages and Wagtail support Django 6.1?

Yes for Django REST Framework, django-allauth and Wagtail, which all declare support for 6.1. Celery and django-storages declare no support for 6.1 but worked in our test. The one blocker we found is django-celery-beat, whose current release refuses to install with 6.1.

Package Latest release on PyPI Django 6.1 Python Worth knowing
Django REST Framework 3.18.3, October 6, 2026 Yes, from 3.18.0 (August 7, 2026) 3.10 or newer 3.18 needs Django 5.2 or newer, and returns many=True serializer errors as a dict (release notes)
Celery 5.7.0, November 5, 2026 Not declared; worked in our test 3.10 or newer Celery lists no Django versions; its Django extra needs Django 3.2.1 or newer (changelog)
django-celery-beat 2.9.0, February 2026 No: it requires Django below 6.1 3.8 or newer 6.1 support is merged but not yet released (changelog)
django-allauth 65.22.1, November 13, 2026 Yes, from 65.19.0 (August 6, 2026) 3.11 or newer Dropped Python 3.10 in 65.20.0 (changelog)
django-storages 1.14.6, April 2, 2025 Not declared; worked in our test 3.7 or newer Its PyPI classifiers stop at Django 5.1; the unreleased main branch adds 5.2 and 6.0 (changelog)
Wagtail 8.1, November 2, 2026 Yes, in 8.0 and 8.1 3.11 or newer The 7.4 LTS lists Django 5.2 and 6.0 only (compatibility table)

How we tested: one project with all five packages, on Python 3.14.10 with Django 5.2.19 and again with 6.1.3. We ran manage.py check and the migrations, created and listed records through DRF, ran a Celery task in eager mode, signed up through allauth (which sent its confirmation email), opened the Wagtail admin, and generated a signed S3 URL through django-storages configured in STORAGES. Everything passed on both, with deprecation warnings turned into errors. We did not run a real Celery worker and broker or upload to a real S3 bucket, so give those a run on staging.

Check the packages around them too. django-celery-beat 2.9.0 still requires Django below 6.1 (support is merged and waiting for a release), so pip will not combine the two, and an unpinned install quietly picks Django 6.0.10 instead. If you depend on it, stay on 5.2 until a release with 6.1 support is out.

# requirements.txt with Django pinned to the target, for example Django==6.1.3.
# Check that it resolves, without installing anything:
python -m pip install --dry-run -r requirements.txt

# Our test, with djangorestframework==3.18.3 and django-celery-beat==2.9.0 (pip 26.3):
# ERROR: Cannot install ... because these package versions have conflicting dependencies.
#     django-celery-beat 2.9.0 depends on Django<6.1 and >=2.2

How do we check our own code before choosing?

Five checks show how far your code is from 6.1, and you can run all of them while 5.2 stays in production.

  1. Paste your code into the Django upgrade checker. Pick 5.2 LTS, 6.0 or 6.1 as the target, and it lists the removed APIs and changed defaults it finds, with the line and the fix. It runs in your browser, and it cannot see your packages or behaviour that only tests reveal.
  2. On 5.2, run the tests with Django's warnings as errors. On 5.2, what 6.0 removes raises RemovedInDjango60Warning, a DeprecationWarning, but what 6.1 removes raises RemovedInDjango61Warning, a PendingDeprecationWarning. -W error::DeprecationWarning on its own misses the second kind, so turn both into errors.
  3. Let django-upgrade make the mechanical changes. With --target-version 5.2, version 1.33.0 renamed check= to condition=, all= to find_all= and ordering= to order_by= in our test, and the result ran on 5.2.19 and on 6.1.3 with warnings as errors. Review its changes like any other pull request.
  4. Run makemigrations --check with the target version installed. It fails if the new release wants a migration, such as the primary key change above.
  5. Resolve your requirements against the target, as in the --dry-run check above, before you plan the work.
# On Django 5.2: warnings for what 6.0 and 6.1 remove both fail the run
python -W error::DeprecationWarning -W error::PendingDeprecationWarning manage.py test

# pytest (with pytest-django): the same two filters
python -m pytest -W error::DeprecationWarning -W error::PendingDeprecationWarning

# Rewrites that still run on 5.2; django-upgrade does not recurse, so pass it the files
git ls-files -z -- '*.py' | xargs -0r django-upgrade --target-version 5.2

# With the target Django installed: exits with an error if it wants a new migration
python manage.py makemigrations --check --dry-run

Which should you upgrade to? Our recommendation by situation

Your situation Upgrade to Why
On 4.2, 5.0 or 5.1 5.2 LTS, now You get no security fixes today. 5.2 runs on your current Python and is the stop before 6.x anyway.
On 5.2, with Python 3.10 or 3.11, PostgreSQL 14 or MySQL 8.0 Stay on 5.2; upgrade Python and the database first Going to 6.1 now would stack three upgrades into one release.
On 5.2, using django-celery-beat Stay on 5.2 for now Its current release does not install with Django 6.1.
On 5.2, with Python 3.12 or newer, PostgreSQL 15 or newer and packages ready 6.1 Bug fixes until April 2027, Django's newest features, and a small step to 6.2 LTS.
On 5.2, a small team that wants as few upgrade projects as possible Stay on 5.2, then 6.2 LTS in 2027 One larger move instead of two, finished before April 2028.
On 6.0 6.1, now Bug fixes for 6.0 ended on August 4, 2026, and security fixes end in April 2027.
Starting a new project 6.1 The newest release; move to 6.2 LTS once your packages support it.

Whichever row fits, put two dates in the calendar: 6.2 LTS is due on April 6, 2027, and leave a few months after that for your packages to catch up before you move.

What is the upgrade path from 4.2, 5.0, 5.1 or 5.2?

Django's upgrade guide recommends going through each feature release on its latest patch release, even from one LTS to the next. In practice:

  1. From 4.2, 5.0 or 5.1, get to 5.2 first and release it to production. Our guide to upgrading Django 4.2 to 5.2 covers each step and what breaks in it.
  2. On 5.2, clear every warning with the tests and the checks above, and let django-upgrade make the renames.
  3. Upgrade Python to 3.12 or newer, then the database to the 6.1 minimums (PostgreSQL 16 or newer if 6.2 is next), each as its own release.
  4. Step through 6.0.10 and 6.1.3 with the tests passing at each step, then fix the new 6.1 deprecation warnings.
  5. Rehearse on a restored copy of production, release with the previous build ready to redeploy, and clear your cache afterwards: the upgrade guide warns that pickled cache objects are not guaranteed to work across versions.

How we approach it at MicroPyramid

We start with a fixed-scope assessment, then run the upgrade as a fixed project that we finish and hand back to your team.

The Upgrade Assessment answers the 5.2-or-6.1 question for your app. It is a version, dependency and end-of-life audit of everything you run, with an upgrade path that calls out the packages that block 6.1, where the tests are thin, and the order to move Python, the database and Django in, plus a fixed estimate before any upgrade work starts.

The upgrade is then a fixed project: missing tests added, warnings fixed on 5.2, blocking packages replaced, each Django step taken on its latest patch release, a rehearsal on a restored copy of production, and a release with a way back. We hand the app back with notes on what changed. To keep it on supported versions afterwards, 6.2 LTS included, our software maintenance is a monthly retainer that runs month to month with 30 days' notice. More about our work on Django upgrades and modernization.

Not sure which target fits your app? Tell us what you run and we will show you the path from where you are to 6.2 LTS.

Frequently Asked Questions

Should we upgrade to Django 5.2 LTS or 6.1?

From 4.2, 5.0 or 5.1, upgrade to 5.2 LTS: it is supported until April 2028 and still runs on Python 3.10 and 3.11. From 5.2, move to 6.1 once you run Python 3.12 or newer, PostgreSQL 15 or newer (or MySQL 8.4, or MariaDB 10.11) and packages that support it; otherwise stay on 5.2 and move to 6.2 LTS in 2027.

How long is Django 5.2 LTS supported?

Until April 2028, with security and data-loss fixes only, because its regular bug fixes ended on December 3, 2025. The 5.2 series is also the last to support Python 3.10 and 3.11.

When does support for Django 6.1 end?

Its bug fixes end in April 2027 and its security fixes in December 2027. Django 6.2 LTS is due in April 2027, so plan the move from 6.1 for between April and December 2027.

Can we upgrade from Django 4.2 straight to 6.1?

Yes, if you run Python 3.12 or newer and a database that meets 6.1's minimums, but go through 5.0, 5.1, 5.2 and 6.0 on the way, each on its latest patch release, as Django's upgrade guide recommends. Releasing 5.2 to production before you go further keeps each change small and puts you back on a supported release sooner.

When is Django 6.2 LTS released, and what comes after it?

Django's roadmap plans 6.2 for April 6, 2027, with security fixes until April 2030. It is the last release numbered the old way: from Django 2028, due in January 2028, Django ships one release a year, and each one gets three years of support.

Do Django REST Framework, Celery and Wagtail support Django 6.1?

Django REST Framework (from 3.18.0), django-allauth (from 65.19.0) and Wagtail (8.0 and 8.1) declare support for 6.1. Celery and django-storages declare none but worked in our test on 6.1.3. django-celery-beat 2.9.0 requires Django below 6.1, so it blocks the upgrade until its next release.

What happens if we stay on Django 5.0 or 5.1?

Neither gets security fixes: 5.0's ended on April 2, 2025 and 5.1's on December 3, 2025. Packages are leaving them behind too: Django REST Framework 3.18 and Wagtail 8 need Django 5.2 or newer. Upgrade to 5.2 LTS, which takes the same first steps as the Django 4.2 to 5.2 upgrade.

Share this article
Facebook X LinkedIn
Related serviceDjango Development Services

Start with a discovery call.

  1. TODAY Send a short message Tell us what you run and where it hurts.
  2. WITHIN ONE WORKING DAY We reply From the engineers you would work with, to set up a free 30-minute call.
  3. ON THE CALL Your first step A fixed-scope sprint or audit. Monthly maintenance after it only if you want it.
Talk to an engineer
Email
hello@micropyramid.com
Offices
Plano --:--Hyderabad --:--Sharjah --:--
You own
All code & IP, from day one

We reply within one working day