djangodocs.org

743 sections in Django 6.0 Search all versions →

Bugfixes

Release notes Django 4.0.2 release notes

Fixed a bug in Django 4.0 that caused a crash of QuerySet.aggregate() after annotate() on an aggregate function with a default (#33468).

Models

Release notes Django 4.1 release notes What’s new in Django 4.1Minor features

after database server restart. QuerySet.bulk_create() now supports updating fields when a row insertion fails uniqueness constraints. This is supported on MariaDB, MySQL, PostgreSQL, and SQLite 3.24+. QuerySet.iterator() now supports prefetching related objects as long as the chunk_size argument is provided.

Features removed in 4.1

Release notes Django 4.1 release notes

The default_app_config application configuration variable is removed. TransactionTestCase.assertQuerysetEqual() no longer calls repr() on a queryset when compared to string values. The django.core.cache.backends.memcached.MemcachedCache backend is removed. Support for the pre-Django 3.2 format of messages used by django.contrib.messages.storage.cookie.CookieStorage is removed.

Bugfixes

Release notes Django 4.1.4 release notes

Fixed a bug in Django 4.1 that caused a crash of QuerySet.bulk_create() with "pk" in unique_fields (#34177). Fixed a bug in Django 4.1 that caused a crash of QuerySet.bulk_create() on fields with db_column (#34171).

django.contrib.postgres

Release notes Django 4.2 release notes What’s new in Django 4.2Minor features

The new trigram_strict_word_similar lookup, and the TrigramStrictWordSimilarity() and TrigramStrictWordDistance() expressions allow using trigram strict word similarity. The arrayfield.overlap lookup now supports QuerySet.values() and values_list() as a right-hand side.

Bugfixes

Release notes Django 4.2.2 release notes

Fixed a regression in Django 4.2 that caused a crash of QuerySet.defer() when passing a ManyToManyField or GenericForeignKey reference. While doing so is a no-op, it was allowed in older version (#34570).

Bugfixes

Release notes Django 4.2.5 release notes

Fixed a regression in Django 4.2 that caused a crash of a queryset when filtering against deeply nested OuterRef() annotations (#34803).

Features removed in 5.0

Release notes Django 5.0 release notes

Support for pytz timezones is removed. The is_dst argument is removed from: QuerySet.datetimes() django.utils.timezone.make_aware() django.db.models.functions.Trunc() django.db.models.functions.TruncSecond() django.db.models.functions.TruncMinute() django.db.models.functions.TruncHour() django.db.models.functions.TruncDay() django.db.models.functions.TruncWeek() django.db.models.functions.TruncMonth() django.db.models.functions.TruncQuarter() django.db.models.functions.TruncYear() The django.contrib.gis.admin.GeoModelAdmin and OSMGeoAdmin classes are removed. The undocumented BaseForm._html_output() method is removed.

Bugfixes

Release notes Django 5.0.2 release notes

Fixed a regression in Django 5.0 that caused a crash of FilteredRelation() with querysets as right-hand sides (#35135). FilteredRelation() now raises a ValueError on querysets as right-hand sides.

Bugfixes

Release notes Django 5.0.3 release notes

Fixed a regression in Django 5.0 that caused a crash when reloading a test database and a base queryset for a base manager used prefetch_related() (#35238).

Miscellaneous

Release notes Django 5.2 release notes Features deprecated in 5.2

The following methods now have alters_data=True set to prevent side effects when rendering a template context: UserManager.create_user() UserManager.acreate_user() UserManager.create_superuser() UserManager.acreate_superuser() QuerySet.create() QuerySet.acreate() QuerySet.bulk_create() QuerySet.abulk_create() QuerySet.get_or_create() QuerySet.aget_or_create() QuerySet.update_or_create() QuerySet.aupdate_or_create() The minimum supported version of oracledb is increased from 1.3.2 to 2.3.0.

Bugfixes

Release notes Django 5.2.1 release notes

Fixed a regression in Django 5.2 that caused a crash of QuerySet.bulk_create() with nullable geometry fields on PostGIS (#36289). Fixed a regression in Django 5.2 that caused fields to be incorrectly selected when using QuerySet.alias() after values() (#36299).

Bugfixes

Release notes Django 5.2.2 release notes

Fixed a regression in Django 5.2 that caused a crash when no arguments were passed into QuerySet.union() (#36388). Fixed a regression in Django 5.2 where subclasses of RemoteUserMiddleware that had overridden process_request() were no longer supported (#36390).

Bugfixes

Release notes Django 5.2.3 release notes

Fixed a regression in Django 5.2 that caused QuerySet.bulk_update() to incorrectly convert None to JSON null instead of SQL NULL for JSONField (#36419).

Bugfixes

Release notes Django 5.2.9 release notes

Fixed a regression in Django 5.2.2 that caused a crash when using aggregate functions with an empty Q filter over a queryset with annotations (#36751).

Models

Release notes Django 6.0 release notes What’s new in Django 6.0Minor features

QuerySet.raw() now supports models with a CompositePrimaryKey. Subqueries returning a CompositePrimaryKey can now be used as the target of lookups other than __in, such as __exact. JSONField now supports negative array indexing on SQLite.

Features removed in 6.0

Release notes Django 6.0 release notes

Support for cx_Oracle is removed. The ChoicesMeta alias to django.db.models.enums.ChoicesType is removed. The Prefetch.get_current_queryset() method is removed. The get_prefetch_queryset() method of related managers and descriptors is removed. get_prefetcher() and prefetch_related_objects() no longer fall back to get_prefetch_queryset().

An improved ORM

Release notes Django 1.0 release notes What’s new in Django 1.0

Django’s object-relational mapper – the component which provides the mapping between Django model classes and your database, and which mediates your database queries – has been dramatically improved by a massive refactoring.

Database backend API

Release notes Django 1.11 release notes Backwards incompatible changes in 1.11

This section describes changes that may be needed in third-party database backends. The DatabaseOperations.time_trunc_sql() method is added to support TimeField truncation.