diff options
| author | Nick Pope <nick.pope@flightdataservices.com> | 2019-07-26 22:05:22 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-08-02 11:39:01 +0200 |
| commit | 194d1dfc186cc8d2b35dabf64f3ed38b757cbd98 (patch) | |
| tree | 51ffabb34edc5b191ce8079c9149b77c88c2749e /docs | |
| parent | 955b382600e4626265cc20e5773bdbcfd01fc4af (diff) | |
Fixed #30661 -- Added models.SmallAutoField.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/models/fields.txt | 11 | ||||
| -rw-r--r-- | docs/releases/3.0.txt | 5 | ||||
| -rw-r--r-- | docs/topics/forms/modelforms.txt | 2 |
3 files changed, 18 insertions, 0 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt index ead39f0572..c267501bf4 100644 --- a/docs/ref/models/fields.txt +++ b/docs/ref/models/fields.txt @@ -1085,6 +1085,17 @@ It uses :class:`~django.core.validators.validate_slug` or If ``True``, the field accepts Unicode letters in addition to ASCII letters. Defaults to ``False``. +``SmallAutoField`` +------------------ + +.. class:: SmallAutoField(**options) + +.. versionadded:: 3.0 + +Like an :class:`AutoField`, but only allows values under a certain +(database-dependent) limit. Values from ``1`` to ``32767`` are safe in all +databases supported by Django. + ``SmallIntegerField`` --------------------- diff --git a/docs/releases/3.0.txt b/docs/releases/3.0.txt index da1578c0eb..9de85ab770 100644 --- a/docs/releases/3.0.txt +++ b/docs/releases/3.0.txt @@ -294,6 +294,11 @@ Models * :class:`~django.db.models.Avg` and :class:`~django.db.models.Sum` now support the ``distinct`` argument. +* Added :class:`~django.db.models.SmallAutoField` which acts much like an + :class:`~django.db.models.AutoField` except that it only allows values under + a certain (database-dependent) limit. Values from ``1`` to ``32767`` are safe + in all databases supported by Django. + Requests and Responses ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/topics/forms/modelforms.txt b/docs/topics/forms/modelforms.txt index 2a13c2d1df..d8b137f624 100644 --- a/docs/topics/forms/modelforms.txt +++ b/docs/topics/forms/modelforms.txt @@ -110,6 +110,8 @@ Model field Form field :class:`SlugField` :class:`~django.forms.SlugField` +:class:`SmallAutoField` Not represented in the form + :class:`SmallIntegerField` :class:`~django.forms.IntegerField` :class:`TextField` :class:`~django.forms.CharField` with |
