diff options
| author | Nick Pope <nick.pope@flightdataservices.com> | 2017-12-11 15:36:33 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-08-20 09:22:25 +0200 |
| commit | 21e559495b8255bba1e8a4429cd083246ab90457 (patch) | |
| tree | 7c28928a42b896f05be9282461dcc0e1db08c03e /docs/releases/3.0.txt | |
| parent | b10d322c41f66dc7c77c36f90a3532269b25ea93 (diff) | |
Fixed #29979, Refs #17337 -- Extracted AutoField field logic into a mixin and refactored AutoFields.
This reduces duplication by allowing AutoField, BigAutoField and
SmallAutoField to inherit from IntegerField, BigIntegerField and
SmallIntegerField respectively. Doing so also allows for enabling the
max_length warning check and minimum/maximum value validation for auto
fields, as well as providing a mixin that can be used for other possible
future auto field types such as a theoretical UUIDAutoField.
Diffstat (limited to 'docs/releases/3.0.txt')
| -rw-r--r-- | docs/releases/3.0.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/releases/3.0.txt b/docs/releases/3.0.txt index 2e345f6fe5..5bb0691363 100644 --- a/docs/releases/3.0.txt +++ b/docs/releases/3.0.txt @@ -304,6 +304,12 @@ Models a certain (database-dependent) limit. Values from ``1`` to ``32767`` are safe in all databases supported by Django. +* :class:`~django.db.models.AutoField`, + :class:`~django.db.models.BigAutoField`, and + :class:`~django.db.models.SmallAutoField` now inherit from + ``IntegerField``, ``BigIntegerField`` and ``SmallIntegerField`` respectively. + System checks and validators are now also properly inherited. + * :attr:`.FileField.upload_to` now supports :class:`pathlib.Path`. Requests and Responses @@ -402,6 +408,11 @@ backends. * ``DatabaseOperations.return_insert_id()`` now requires an additional ``field`` argument with the model field. +* Entries for ``AutoField``, ``BigAutoField``, and ``SmallAutoField`` are added + to ``DatabaseOperations.integer_field_ranges`` to support the integer range + validators on these field types. Third-party backends may need to customize + the default entries. + :mod:`django.contrib.admin` --------------------------- |
