summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/fields.txt11
-rw-r--r--docs/releases/3.0.txt5
-rw-r--r--docs/topics/forms/modelforms.txt2
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