mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #14286 -- Added models.BigAutoField.
This commit is contained in:
parent
a1d0c60fa0
commit
2a7ce34600
19 changed files with 260 additions and 20 deletions
|
@ -388,12 +388,22 @@ according to available IDs. You usually won't need to use this directly; a
|
|||
primary key field will automatically be added to your model if you don't specify
|
||||
otherwise. See :ref:`automatic-primary-key-fields`.
|
||||
|
||||
``BigAutoField``
|
||||
----------------
|
||||
|
||||
.. class:: BigAutoField(**options)
|
||||
|
||||
.. versionadded:: 1.10
|
||||
|
||||
A 64-bit integer, much like an :class:`AutoField` except that it is
|
||||
guaranteed to fit numbers from ``1`` to ``9223372036854775807``.
|
||||
|
||||
``BigIntegerField``
|
||||
-------------------
|
||||
|
||||
.. class:: BigIntegerField(**options)
|
||||
|
||||
A 64 bit integer, much like an :class:`IntegerField` except that it is
|
||||
A 64-bit integer, much like an :class:`IntegerField` except that it is
|
||||
guaranteed to fit numbers from ``-9223372036854775808`` to
|
||||
``9223372036854775807``. The default form widget for this field is a
|
||||
:class:`~django.forms.TextInput`.
|
||||
|
|
|
@ -242,6 +242,10 @@ Models
|
|||
:class:`~django.db.models.Func`. This attribute can be used to set the number
|
||||
of arguments the function accepts.
|
||||
|
||||
* Added :class:`~django.db.models.BigAutoField` which acts much like an
|
||||
:class:`~django.db.models.AutoField` except that it is guaranteed
|
||||
to fit numbers from ``1`` to ``9223372036854775807``.
|
||||
|
||||
Requests and Responses
|
||||
^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
|
@ -56,6 +56,8 @@ Model field Form field
|
|||
=================================== ==================================================
|
||||
:class:`AutoField` Not represented in the form
|
||||
|
||||
:class:`BigAutoField` Not represented in the form
|
||||
|
||||
:class:`BigIntegerField` :class:`~django.forms.IntegerField` with
|
||||
``min_value`` set to -9223372036854775808
|
||||
and ``max_value`` set to 9223372036854775807.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue