djangodocs.org

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

Forms

Reference

Detailed form API reference. For introductory material, see the Working with forms topic guide.

4.2 5.0 5.1 5.2

Release notes Django 1.4 release notes

Django 1.4 includes a QuerySet.select_for_update() method, which generates a SELECT ... FOR UPDATE SQL query. This will lock rows until the end of the transaction, meaning other transactions cannot modify or delete rows matched by a FOR UPDATE query.

dev

Release notes Django 1.7 release notes

Historically, queries that use select_for_update() could be executed in autocommit mode, outside of a transaction. Before Django 1.6, Django’s automatic transactions mode allowed this to be used to lock records until the next write operation.

dev

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

Django 1.4 includes a QuerySet.select_for_update() method, which generates a SELECT ... FOR UPDATE SQL query. This will lock rows until the end of the transaction, meaning other transactions cannot modify or delete rows matched by a FOR UPDATE query.

4.2 5.0 5.1 5.2 6.0

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

Models

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

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.

5.2 6.0

Bugfixes

Release notes Django 1.10.1 release notes

Fixed a crash in MySQL connections where SELECT @@SQL_AUTO_IS_NULL doesn’t return a result (#26991). Allowed User.is_authenticated and User.is_anonymous properties to be compared using ==, !=, and | (#26988, #27154). Removed the broken BaseCommand.usage() method which was for optparse support (#27000).

dev

Bugfixes

Release notes Django 1.10.2 release notes

Fixed a crash in MySQL database validation where SELECT @@sql_mode doesn’t return a result (#27180). Allowed combining contrib.postgres.search.SearchQuery with more than one & or | operators (#27143). Disabled system check for URL patterns beginning with a ‘/’ when APPEND_SLASH=False (#27238).

dev

Database backends

Release notes Django 1.11 release notes

Added the skip_locked argument to QuerySet.select_for_update() on PostgreSQL 9.5+ and Oracle to execute queries with FOR UPDATE SKIP LOCKED. Added the TEST['TEMPLATE'] setting to let PostgreSQL users specify a template for creating the test database.

dev

Bugfixes

Release notes Django 2.1.15 release notes

Fixed a data loss possibility in the select_for_update(). When using 'self' in the of argument with multi-table inheritance, a parent model was locked instead of the queryset’s model (#30953).

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

Bugfixes

Release notes Django 1.10.1 release notes

Fixed a crash in MySQL connections where SELECT @@SQL_AUTO_IS_NULL doesn’t return a result (#26991). Allowed User.is_authenticated and User.is_anonymous properties to be compared using ==, !=, and | (#26988, #27154). Removed the broken BaseCommand.usage() method which was for optparse support (#27000).

4.2 5.0 5.1 5.2 6.0

Bugfixes

Release notes Django 1.10.2 release notes

Fixed a crash in MySQL database validation where SELECT @@sql_mode doesn’t return a result (#27180). Allowed combining contrib.postgres.search.SearchQuery with more than one & or | operators (#27143). Disabled system check for URL patterns beginning with a ‘/’ when APPEND_SLASH=False (#27238).

4.2 5.0 5.1 5.2 6.0

Database backends

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

Added the skip_locked argument to QuerySet.select_for_update() on PostgreSQL 9.5+ and Oracle to execute queries with FOR UPDATE SKIP LOCKED. Added the TEST['TEMPLATE'] setting to let PostgreSQL users specify a template for creating the test database.

4.2 5.0 5.1 5.2 6.0

Bugfixes

Release notes Django 2.1.15 release notes

Fixed a data loss possibility in the select_for_update(). When using 'self' in the of argument with multi-table inheritance, a parent model was locked instead of the queryset’s model (#30953).

4.2 5.0 5.1 5.2 6.0

Models

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

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.

4.2 5.0 5.1 5.2 6.0

Admin “actions”

Release notes Django 1.1 release notes

You can now define admin actions that can perform some action to a group of models in bulk. Users will be able to select objects on the change list page and then apply these bulk actions to all selected objects.

dev