pub struct PatchedWritableCustomFieldRequest {Show 16 fields
pub id: Option<Uuid>,
pub content_types: Option<Vec<String>>,
pub label: Option<String>,
pub grouping: Option<String>,
pub type: Option<CustomFieldTypeChoices>,
pub key: Option<String>,
pub description: Option<String>,
pub required: Option<bool>,
pub filter_logic: Option<FilterLogicEnum>,
pub default: Option<Option<Value>>,
pub weight: Option<i32>,
pub validation_minimum: Option<Option<i64>>,
pub validation_maximum: Option<Option<i64>>,
pub validation_regex: Option<String>,
pub advanced_ui: Option<bool>,
pub scope_filter: Option<Option<Value>>,
}Expand description
PatchedWritableCustomFieldRequest : Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)
Fields§
§id: Option<Uuid>§content_types: Option<Vec<String>>§label: Option<String>§grouping: Option<String>Human-readable grouping that this custom field belongs to.
type: Option<CustomFieldTypeChoices>§key: Option<String>Internal field name. Please use underscores rather than dashes in this key.
description: Option<String>A helpful description for this field.
required: Option<bool>If true, this field is required when creating new objects or editing an existing object.
filter_logic: Option<FilterLogicEnum>§default: Option<Option<Value>>Default value for the field (must be a JSON value). Encapsulate strings with double quotes (e.g. "Foo").
weight: Option<i32>Fields with higher weights appear lower in a form.
validation_minimum: Option<Option<i64>>Minimum allowed value (for numeric fields) or length (for text fields).
validation_maximum: Option<Option<i64>>Maximum allowed value (for numeric fields) or length (for text fields).
validation_regex: Option<String>Regular expression to enforce on text field values. Use ^ and $ to force matching of entire string. For example, ^[A-Z]{3}$ will limit values to exactly three uppercase letters. Regular expression on select and multi-select will be applied at Custom Field Choices definition.
advanced_ui: Option<bool>Hide this field from the object’s primary information tab. It will appear in the "Advanced" tab instead.
scope_filter: Option<Option<Value>>A JSON-encoded dictionary of filter parameters defining possible objects that can use this custom field.
Implementations§
Source§impl PatchedWritableCustomFieldRequest
impl PatchedWritableCustomFieldRequest
Sourcepub fn new() -> PatchedWritableCustomFieldRequest
pub fn new() -> PatchedWritableCustomFieldRequest
Extends the built-in ModelSerializer to enforce calling full_clean() on a copy of the associated instance during validation. (DRF does not do this by default; see https://github.com/encode/django-rest-framework/issues/3144)
Trait Implementations§
Source§impl Clone for PatchedWritableCustomFieldRequest
impl Clone for PatchedWritableCustomFieldRequest
Source§fn clone(&self) -> PatchedWritableCustomFieldRequest
fn clone(&self) -> PatchedWritableCustomFieldRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for PatchedWritableCustomFieldRequest
impl Default for PatchedWritableCustomFieldRequest
Source§fn default() -> PatchedWritableCustomFieldRequest
fn default() -> PatchedWritableCustomFieldRequest
Source§impl<'de> Deserialize<'de> for PatchedWritableCustomFieldRequest
impl<'de> Deserialize<'de> for PatchedWritableCustomFieldRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PatchedWritableCustomFieldRequest
impl PartialEq for PatchedWritableCustomFieldRequest
Source§fn eq(&self, other: &PatchedWritableCustomFieldRequest) -> bool
fn eq(&self, other: &PatchedWritableCustomFieldRequest) -> bool
self and other values to be equal, and is used by ==.