pub struct PatchedWritableCustomFieldRequest {Show 22 fields
pub object_types: Option<Vec<String>>,
pub type: Option<RHashType>,
pub related_object_type: Option<Option<String>>,
pub name: Option<String>,
pub label: Option<String>,
pub group_name: Option<String>,
pub description: Option<String>,
pub required: Option<bool>,
pub unique: Option<bool>,
pub search_weight: Option<i32>,
pub filter_logic: Option<FilterLogic>,
pub ui_visible: Option<UiVisible>,
pub ui_editable: Option<UiEditable>,
pub is_cloneable: Option<bool>,
pub default: Option<Option<Value>>,
pub related_object_filter: Option<Option<Value>>,
pub weight: Option<i32>,
pub validation_minimum: Option<Option<f64>>,
pub validation_maximum: Option<Option<f64>>,
pub validation_regex: Option<String>,
pub choice_set: Option<Option<Box<CustomFieldRequestChoiceSet>>>,
pub comments: Option<String>,
}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§
§object_types: Option<Vec<String>>§type: Option<RHashType>The type of data this custom field holds * text - Text * longtext - Text (long) * integer - Integer * decimal - Decimal * boolean - Boolean (true/false) * date - Date * datetime - Date & time * url - URL * json - JSON * select - Selection * multiselect - Multiple selection * object - Object * multiobject - Multiple objects
name: Option<String>Internal field name
label: Option<String>Name of the field as displayed to users (if not provided, ’the field’s name will be used)
group_name: Option<String>Custom fields within the same group will be displayed together
description: Option<String>§required: Option<bool>This field is required when creating new objects or editing an existing object.
unique: Option<bool>The value of this field must be unique for the assigned object
search_weight: Option<i32>Weighting for search. Lower values are considered more important. Fields with a search weight of zero will be ignored.
filter_logic: Option<FilterLogic>Loose matches any instance of a given string; exact matches the entire field. * disabled - Disabled * loose - Loose * exact - Exact
ui_visible: Option<UiVisible>Specifies whether the custom field is displayed in the UI * always - Always * if-set - If set * hidden - Hidden
ui_editable: Option<UiEditable>Specifies whether the custom field value can be edited in the UI * yes - Yes * no - No * hidden - Hidden
is_cloneable: Option<bool>Replicate this value when cloning objects
default: Option<Option<Value>>Default value for the field (must be a JSON value). Encapsulate strings with double quotes (e.g. "Foo").
Filter the object selection choices using a query_params dict (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<f64>>Minimum allowed value (for numeric fields)
validation_maximum: Option<Option<f64>>Maximum allowed value (for numeric 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.
choice_set: Option<Option<Box<CustomFieldRequestChoiceSet>>>§comments: Option<String>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 ==.