RandomUUID
This class represents a database function that generates a random UUID. It utilizes the underlying database's random UUID generation capabilities and ensures the output is handled as a UUID field type.
Attributes
| Attribute | Type | Description |
|---|---|---|
| template | string = GEN_RANDOM_UUID() | The SQL template string used to generate a random UUID, defaulting to the PostgreSQL GEN_RANDOM_UUID() function. |
| output_field | [UUIDField](../../../forms/fields/uuidfield.md?sid=django_forms_fields_uuidfield) = UUIDField() | The database field type used to represent the resulting value, ensuring the output is handled as a UUIDField. |
Constructor
Signature
def RandomUUID() - > null
Signature
def RandomUUID() - > null