djangodocs.org

1413 sections across all versions Narrow to Django 6.0 (current) →

Minor features

Release notes Django 1.4 release notes

The distinct() QuerySet method now accepts an optional list of model field names. If specified, then the DISTINCT statement is limited to these fields. This is only supported in PostgreSQL. For more details, see the documentation for distinct().

dev

Models

Release notes Django 1.7 release notes

The QuerySet.update_or_create() method was added. The new default_permissions model Meta option allows you to customize (or disable) creation of the default add, change, and delete permissions. Explicit OneToOneField for Multi-table inheritance are now discovered in abstract classes.

dev

Models

Release notes Django 4.0 release notes

New QuerySet.contains(obj) method returns whether the queryset contains the given object. This tries to perform the query in the simplest and fastest way possible.

dev

Release notes Django 4.1 release notes

QuerySet now provides an asynchronous interface for all data access operations. These are named as-per the existing synchronous operations but with an a prefix, for example acreate(), aget(), and so on.

dev

Minor features

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

The distinct() QuerySet method now accepts an optional list of model field names. If specified, then the DISTINCT statement is limited to these fields. This is only supported in PostgreSQL. For more details, see the documentation for distinct().

4.2 5.0 5.1 5.2 6.0

Models

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

The QuerySet.update_or_create() method was added. The new default_permissions model Meta option allows you to customize (or disable) creation of the default add, change, and delete permissions. Explicit OneToOneField for Multi-table inheritance are now discovered in abstract classes.

4.2 5.0 5.1 5.2 6.0

Models

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

New QuerySet.contains(obj) method returns whether the queryset contains the given object. This tries to perform the query in the simplest and fastest way possible.

4.2 5.0 5.1 5.2 6.0

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

QuerySet now provides an asynchronous interface for all data access operations. These are named as-per the existing synchronous operations but with an a prefix, for example acreate(), aget(), and so on.

4.2 5.0 5.1 5.2 6.0

Miscellaneous

Release notes Django 1.10 release notes

The repr() of a QuerySet is wrapped in <QuerySet > to disambiguate it from a plain list when debugging. utils.version.get_version() returns PEP 440 compliant release candidate versions (e.g. ‘1.10rc1’ instead of ‘1.10c1’).

dev

Bugfixes

Release notes Django 1.5.4 release notes

Fixed a bug that prevented a QuerySet that uses prefetch_related() from being pickled and unpickled more than once (the second pickling attempt raised an exception) (#21102).

dev

Bugfixes

Release notes Django 2.0.3 release notes

Fixed a regression that caused sliced QuerySet.distinct().order_by() followed by count() to crash (#29108). Prioritized the datetime and time input formats without %f for the Thai locale to fix the admin time picker widget displaying “undefined” (#29109).

dev

Bugfixes

Release notes Django 2.1.1 release notes

Fixed a race condition in QuerySet.update_or_create() that could result in data loss (#29499). Fixed a regression where QueryDict.urlencode() crashed if the dictionary contains a non-string value (#29627).

dev

Models

Release notes Django 3.2 release notes

The new no_key parameter for QuerySet.select_for_update(), supported on PostgreSQL, allows acquiring weaker locks that don’t block the creation of rows that reference locked rows through a foreign key. When() expression now allows using the condition argument with lookups.

dev

Models

Release notes Django 5.0 release notes

The new create_defaults argument of QuerySet.update_or_create() and QuerySet.aupdate_or_create() methods allows specifying a different field values for the create operation. The new violation_error_code attribute of BaseConstraint, CheckConstraint, and UniqueConstraint allows customizing the code of ValidationError raised during model validation.

dev

Models

Release notes Django 5.2 release notes

The SELECT clause generated when using QuerySet.values() and QuerySet.values_list() now matches the specified order of the referenced expressions. Previously, the order was based on a set of counterintuitive rules which made query combination through methods such as QuerySet.union() unpredictable.

dev

Bugfixes

Release notes Django 5.2.6 release notes

Fixed a bug where using QuerySet.values() or values_list() with a ForeignObject composed of multiple fields returned incorrect results instead of tuples of the referenced fields (#36431).

dev

Miscellaneous

Release notes Django 6.1 release notes

Specify the related fields to fetch instead. Calling QuerySet.values_list() with flat=True and no field name is deprecated. Pass an explicit field name, like values_list("pk", flat=True). Support for Model.from_db() methods that do not accept the fetch_mode keyword argument is deprecated.

dev