mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #19463 -- Added UUIDField
Uses native support in postgres, and char(32) on other backends.
This commit is contained in:
@@ -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
|
||||
-------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user