mirror of
https://github.com/django/django.git
synced 2025-12-09 19:08:06 +00:00
Fixed #19463 -- Added UUIDField
Uses native support in postgres, and char(32) on other backends.
This commit is contained in:
parent
0d1561d197
commit
ed7821231b
17 changed files with 274 additions and 4 deletions
|
|
@ -888,6 +888,20 @@ For each field, we describe the default widget used if you don't specify
|
|||
|
||||
These are the same as ``CharField.max_length`` and ``CharField.min_length``.
|
||||
|
||||
``UUIDField``
|
||||
-------------
|
||||
|
||||
.. versionadded:: 1.8
|
||||
|
||||
.. class:: UUIDField(**kwargs)
|
||||
|
||||
* Default widget: :class:`TextInput`
|
||||
* Empty value: ``''`` (an empty string)
|
||||
* Normalizes to: A :class:`~python:uuid.UUID` object.
|
||||
* Error message keys: ``required``, ``invalid``
|
||||
|
||||
This field will accept any string format accepted as the ``hex`` argument
|
||||
to the :class:`~python:uuid.UUID` constructor.
|
||||
|
||||
Slightly complex built-in ``Field`` classes
|
||||
-------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue