Django upgrade checker: find what breaks before you upgrade.

Paste your settings, models, views, URLs and templates. The checker lists the removed APIs and changed defaults it finds between your Django version and 5.2 LTS, 6.0 or 6.1, with the line, the fix and the release notes behind each one. It runs in your browser, so your code stays with you.

settings.py, models, views, urls.py, admin.py, templates and requirements.txt. Paste several files at once; the more you paste, the more it finds.

Runs in your browser. Your code is not uploaded or stored.

What breaks in each Django release.

The 67 checks the tool runs, by the release that removed or changed each one. Each comes from Django's release notes, checked on 18 November 2026, and each removal that runs outside a project was tried on Django 3.2 to 6.1.

Django 2.0

django.core.urlresolvers
Import reverse, resolve and the rest from django.urls.
ForeignKey or OneToOneField without on_delete
Add on_delete to every one, in models and in migrations. models.CASCADE keeps the old behaviour; squashing migrations first leaves fewer files to edit.
MIDDLEWARE_CLASSES setting
Django no longer reads it, so none of that middleware runs. Rename it to MIDDLEWARE and convert old-style middleware classes (MiddlewareMixin helps).
is_authenticated() or is_anonymous() called as a method
They are properties now: drop the brackets, as in if request.user.is_authenticated:.
assignment_tag
Use simple_tag, which can store its result in a variable with as.
include(..., app_name=...)
Set app_name in the included URLconf, or pass a (module, app_name) tuple to include().
allow_tags on admin methods (changes behaviour)
Django ignores it, so the admin shows the HTML as escaped text. Return format_html(...) from the method instead.
CommaSeparatedIntegerField in a model
Use CharField(validators=[validate_comma_separated_integer_list]). Old migrations can keep the old field.
Django 2.0 release notes

Django 3.0

render_to_response()
Use render(request, template_name, context).
{% load staticfiles %} or {% load admin_static %}
Use {% load static %}.
django.utils.six
Remove it: the code runs on Python 3 only. If you still need it, install the six package and import that.
Python 2 helpers: python_2_unicode_compatible, lru_cache, available_attrs or curry
Delete @python_2_unicode_compatible, and use functools.lru_cache, functools.WRAPPER_ASSIGNMENTS and functools.partial.
django.db.backends.postgresql_psycopg2
Set the database ENGINE to 'django.db.backends.postgresql'.
Django 3.0 release notes

Django 4.0

django.conf.urls.url()
Use re_path() from django.urls, which takes the same regular expressions, or path().
ugettext(), ugettext_lazy() and the other u translation functions
Use gettext(), gettext_lazy(), gettext_noop(), ngettext() and ngettext_lazy().
force_text() or smart_text()
Use force_str() and smart_str().
urlquote() and the related helpers in django.utils.http
Use quote(), quote_plus(), unquote() and unquote_plus() from urllib.parse.
is_safe_url()
Use url_has_allowed_host_and_scheme() from django.utils.http.
request.is_ajax()
Check the header yourself, as in request.headers.get('x-requested-with') == 'XMLHttpRequest', or check what the client accepts.
NullBooleanField in a model
Use BooleanField(null=True). Old migrations can keep the old field.
JSONField from django.contrib.postgres
Use models.JSONField and forms.JSONField, which work on every supported database. Old migrations can keep the old field.
{% ifequal %} or {% ifnotequal %}
Use {% if a == b %} and {% if a != b %}.
PASSWORD_RESET_TIMEOUT_DAYS setting (changes behaviour)
Django ignores it, so reset links fall back to the default of three days. Set PASSWORD_RESET_TIMEOUT in seconds instead.
CSRF_TRUSTED_ORIGINS entries without a scheme
Write each origin with its scheme, as in 'https://example.com', and 'https://*.example.com' in place of '.example.com'. Without it, a system check stops the project.
Signal(providing_args=...)
Remove the argument, and describe the arguments in a comment or docstring instead.
get_random_string() without a length
Pass the length, as in get_random_string(32).
Django 4.0 release notes

Django 4.1

default_app_config (changes behaviour)
Django ignores it. It picks an app's AppConfig by itself when apps.py has exactly one; otherwise list the config class in INSTALLED_APPS.
MemcachedCache backend
Use PyMemcacheCache (with pymemcache) or PyLibMCCache (with pylibmc).
requires_system_checks = True or False in a management command
Use '__all__' in place of True, and [] in place of False.
Django 4.1 release notes

Django 5.0

settings.py does not set USE_TZ (changes behaviour)
The default changes from False to True, which turns on time zone support and changes how datetimes are stored and compared. Add USE_TZ = False to keep the current behaviour, then plan the switch.
USE_L10N setting (changes behaviour)
Localized formatting is always on now, so numbers and dates in templates follow the active language's format. Delete the setting; if it was False, check how numbers and dates display.
pytz time zones
Django no longer accepts pytz time zones, so a pytz zone passed to Django's time zone functions or settings breaks. Switch to zoneinfo from Python's standard library; pytz code that never touches Django keeps working.
django.utils.timezone.utc
Use datetime.timezone.utc.
django.utils.datetime_safe or django.utils.baseconv
Use Python's datetime module, and a small helper of your own in place of baseconv.
PickleSerializer for sessions
Switch SESSION_SERIALIZER to JSONSerializer. Sessions saved with pickle cannot be read afterwards, so people may need to log in again.
Logout link that sends a GET request
Django's built-in logout view accepts only POST now, and a GET gets a 405 error. Make the link a small form that posts, with {% csrf_token %}. A link to a logout view of your own is not affected.
{{ form }} rendered without a format (changes behaviour)
Forms and formsets render as <div> elements now instead of table rows, which can break page layouts and CSS. Use {{ form.as_table }} to keep the old markup, or restyle.
is_dst argument
Remove it from make_aware(), QuerySet.datetimes() and the Trunc functions.
GeoModelAdmin or OSMGeoAdmin
Use GISModelAdmin.
Django 5.0 release notes

Django 5.1

DEFAULT_FILE_STORAGE or STATICFILES_STORAGE setting (changes behaviour)
Django 5.1 ignores both without any error, so uploads and static files quietly fall back to local disk storage. Move them into the STORAGES setting, which works from 4.2.
get_storage_class()
Use storages['default'] from django.core.files.storage, or import_string() for a class path.
Meta.index_together
Replace it with Meta.indexes = [models.Index(fields=[...])] and run makemigrations while still on 4.2 or 5.0: Django then renames the existing index instead of rebuilding it.
length_is template filter
Use {% if value|length == 2 %}.
SHA1PasswordHasher, UnsaltedSHA1PasswordHasher or UnsaltedMD5PasswordHasher
Remove them from PASSWORD_HASHERS. First wrap any stored passwords that still use them in a stronger hasher (Django's password docs show how), or those people cannot log in.
CICharField, CIEmailField or CITextField in a model
Use CharField, EmailField or TextField with a case-insensitive db_collation. Old migrations can keep the old fields.
make_random_password()
Use get_random_string() from django.utils.crypto, or Python's secrets module.
assertFormsetError() or assertQuerysetEqual()
They are renamed assertFormSetError() and assertQuerySetEqual().
Django 5.1 release notes

Django 6.0

settings.py does not set DEFAULT_AUTO_FIELD (changes behaviour)
Django 6.0 defaults to BigAutoField, so makemigrations will want to change primary keys to 64-bit integers. Add DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' to keep today's keys, unless every app's AppConfig sets default_auto_field.
format_html() called with only a string
Pass the values as arguments, as in format_html('<b>{}</b>', name), or use mark_safe() for fixed HTML. An f-string inside format_html() skips the escaping it exists for.
CheckConstraint(check=...)
Rename the argument to condition=, in models and in migration files.
lookup_allowed() override without request
Add request to the signature: def lookup_allowed(self, lookup, value, request):.
forms.URLField without assume_scheme (changes behaviour)
A URL typed without a scheme now gets https:// instead of http://. Pass assume_scheme='http' where the old behaviour matters.
DjangoDivFormRenderer or Jinja2DivFormRenderer
Remove them from FORM_RENDERER: div rendering is the default since 5.0.
log_action() or log_deletion()
Use the plural LogEntry.objects.log_actions() and ModelAdmin.log_deletions().
django.utils.itercompat
Use isinstance(value, collections.abc.Iterable).
ChoicesMeta
It is renamed ChoicesType.
OS_OPEN_FLAGS on FileSystemStorage
To overwrite files, pass allow_overwrite=True to FileSystemStorage.
cx_Oracle driver
Use the oracledb driver.
Django 6.0 release notes

Django 6.1

finders.find(..., all=...)
Rename the argument to find_all=.
ordering= on ArrayAgg, JSONBAgg or StringAgg
Rename the argument to order_by=.
Django 5.2 release notes

Deprecated in 6.0 and 6.1

These still work on 6.0 and 6.1 with a warning, and stop working in the release Django calls 2028, after 6.2.

ADMINS or MANAGERS as (name, email) pairs
Use a list of address strings, as in ['ops@example.com'] or ['"Ops" <ops@example.com>'].
send_mail() or EmailMessage() with more than four positional arguments
Pass fail_silently and the arguments after it by keyword.
EMAIL_HOST and the other EMAIL_* settings
Move them into the new MAILERS setting.
select_related() with no arguments, or list_select_related = True
Name the relations to fetch, as in select_related('author').
values_list(flat=True) without a field name
Name the field, as in values_list('pk', flat=True).
transaction.savepoint()
It is renamed savepoint_create().
Django 6.0 release notes
What each target needs
ReleasePythonPostgreSQLSecurity support until
Django 5.2 LTS3.10 or newer14 or newerApril 2028
Django 6.03.12 or newer14 or newerApril 2027
Django 6.13.12 or newer15 or newerDecember 2027

Sources: Django FAQ: which Python version, each release's notes, and our end-of-life dates.

How to upgrade Django without surprises.

The checker tells you what to change. This is the order that keeps the app running while you change it.

  1. 01 / 04

    Go one release at a time

    Django's own upgrade guide recommends stepping through each feature release on its latest patch, such as 4.2 to 5.0 to 5.1 to 5.2, rather than making every change at once.

  2. 02 / 04

    Turn on deprecation warnings

    Run the tests with python -Wa manage.py test on the version you have, and fix every warning before moving on. Today's warnings are the next release's errors.

  3. 03 / 04

    Upgrade the packages with it

    Each package has to support the target release: Django REST framework, Celery, django-storages and the rest. Upgrade them first, and replace the ones nobody maintains.

  4. 04 / 04

    Deploy with a way back

    Snapshot the database before migrations run, keep the old build deployable, and clear the cache after the upgrade, as Django's guide advises for pickled cache entries.

How the checker works

It reads what you paste, in your browser, and looks for the imports, settings, model fields, template tags and calls that each release removed or changed. It reads your Django version from Django==3.2.25 in a requirements file, and your Python and PostgreSQL versions from a Dockerfile or docker-compose file, using the same parser as our end-of-life checker. Commented-out lines are skipped, and so are removed fields that old migrations are allowed to keep.

It cannot run your code, so it misses what only tests show, and it does not look inside third-party packages. Nothing you paste leaves your browser.

Related: our guide to upgrading Django 4.2 to 5.2, the end-of-life checker and maintenance and takeover. Rules checked .

Frequently asked questions.

Straight answers about Django upgrades and what the checker covers.

What breaks when upgrading Django 4.2 to 5.2?

Mostly what Django 5.0 and 5.1 removed: pytz time zones, django.utils.timezone.utc, Meta.index_together, the length_is filter, the SHA1 and unsalted MD5 password hashers, logout by GET request and get_storage_class(). Two changes are silent: USE_TZ now defaults to True, and Django 5.1 ignores DEFAULT_FILE_STORAGE and STATICFILES_STORAGE, so files fall back to local disk unless you move them into STORAGES. Django 5.2 also needs Python 3.10 and PostgreSQL 14 or newer.

Which Python version does Django 5.2 need?

Django 5.2 supports Python 3.10, 3.11, 3.12, 3.13 and 3.14 (3.14 from 5.2.8). Django 6.0 and 6.1 need Python 3.12 or newer, so a project on Python 3.10 or 3.11 has to move Python first.

Should I upgrade to Django 5.2 LTS or to 6.x?

For most projects on 4.2 or older, 5.2 LTS: it is supported until April 2028 and still runs on Python 3.10. Django 6.1 is supported until December 2027 and needs Python 3.12 and PostgreSQL 15. Django 6.0 support ends April 2027, so it is a step on the way rather than a place to stop.

Can I upgrade straight from Django 3.2 to 5.2?

You can, but Django's own guide recommends going through each feature release on its latest patch: fix the deprecation warnings it raises, run the tests, then move on. The checker shows everything between your version and the target at once, grouped by the release that brings each change, which is the order to fix them in.

Does the checker find everything that will break?

No. It looks for the 67 most common removed APIs and changed defaults in the code you paste. It cannot see inside third-party packages, database-specific behaviour, or problems that only your tests reveal. Treat a clean result as a good sign, and run the test suite with python -Wa manage.py test on each release.

Is my code uploaded?

No. The check runs in your browser, and nothing you paste is sent to our server or stored. Copying the report puts plain text on your clipboard and nowhere else.

What does an Upgrade Assessment include?

It is a fixed-scope first step: a version, package and end-of-life audit of the whole codebase, and an upgrade path with the test gaps and risks called out, so you know the order of work before anything changes. For an app another team built, start with a Takeover Assessment instead.

Upgrading an older Django app?

Send us the repository or the requirements file. We will scope an Upgrade Assessment: the full check, the order of work and the risks, as a fixed-scope first step.

  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.
Ask for an Upgrade Assessment
Email
hello@micropyramid.com
Offices
Plano --:--Hyderabad --:--Sharjah --:--
You own
All code & IP, from day one

We reply within one working day