# Upgrade Django v6.2.x

Django 6.2 is the next Long Term Support release, expected in April 2027. It takes
over from [Django 5.2](https://upgradedjango.com/5.2/), whose extended support runs until
April 2028, so the two overlap for a full year and there is no rush to move the day
6.2 lands.

**These notes are still under development.** Django's own 6.2 release notes are
largely unwritten at this point, and most sections are still placeholders. What
follows is what has been confirmed so far and will change as the release takes
shape.

## Release Highlights:

- New `listurls` management command prints the URLs from your root URLconf alongside the view class or function that serves each one, which is a genuinely useful way to audit a large project.
- `makemigrations` now tracks changes to unmanaged models, covering added, removed, and altered fields, constraints, and renames.
- Database-backed caches gain probabilistic culling, running the cull on a percentage of writes rather than every write, tuned with `CULL_PROBABILITY` and defaulting to 10%.
- `import_string()` now resolves modules, not only already-imported submodules.
- The default PBKDF2 iteration count rises again, from 1,500,000 in 6.1 to 1,800,000.
- New `BaseCommand.requires_settings` attribute controls whether an `ImportError` from the settings module is suppressed.

## Upgrade Gotchas:

- Requires Python 3.12, 3.13, or 3.14, the same range as 6.0 and 6.1.
- `JsonResponse` flips its `safe` argument to default to `False` rather than `True`. If you relied on the old default to reject non-dict objects, that guard is gone, and the `safe` parameter itself is deprecated.
- Minimum `asgiref` version rises from 3.9.1 to 3.12.1.
- The admin now returns HTTP 403 rather than leaking existence: `view_on_site` requires view or change permission, and the history view checks permissions before it checks whether the object exists.
- `MiddlewareMixin` moves from `django.utils.deprecation` to `django.middleware`. The old import path is deprecated.
- Calling `QuerySet.aiterator()` after `prefetch_related()` without a `chunk_size` is deprecated.
- `DjangoJSONEncoder` now omits zero milliseconds when serialising datetime and time values, which changes the exact strings in serialised output.

Because 6.2 is an LTS, this is the release most projects will want to target. If you
are on 5.2 today, you have until April 2028, but planning the hop while both are
supported is much less painful than doing it after 5.2 goes end of life.

Source: https://upgradedjango.com/6.2/
