djangodocs.org

680 sections in Django 5.0 Search all versions →

Release notes Django 1.6 release notes Backwards incompatible changes in 1.6

When the time zone support added in Django 1.4 was active, QuerySet.dates() lookups returned unexpected results, because the aggregation was performed in UTC. To fix this, Django 1.6 introduces a new API, QuerySet.datetimes().

Models

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

QuerySet.bulk_create() now works on proxy models. Database configuration gained a TIME_ZONE option for interacting with databases that store datetimes in local time and don’t support time zones when USE_TZ is True.

Models

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

QuerySet now extensively supports filtering against Window functions with the exception of disjunctive filter lookups against window functions when performing aggregation. prefetch_related() now supports Prefetch objects with sliced querysets. Registering lookups on Field instances is now supported.

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().

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.

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.