pub struct ComputedFieldRequest {
pub id: Option<Uuid>,
pub content_type: String,
pub key: Option<String>,
pub grouping: Option<String>,
pub label: String,
pub description: Option<String>,
pub template: String,
pub fallback_value: Option<String>,
pub weight: Option<i32>,
pub advanced_ui: Option<bool>,
}Expand description
ComputedFieldRequest : 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_type: String§key: Option<String>Internal field name. Please use underscores rather than dashes in this key.
grouping: Option<String>Human-readable grouping that this computed field belongs to.
label: StringName of the field as displayed to users
description: Option<String>§template: StringJinja2 template code for field value
fallback_value: Option<String>Fallback value (if any) to be output for the field in the case of a template rendering error.
weight: Option<i32>§advanced_ui: Option<bool>Hide this field from the object’s primary information tab. It will appear in the "Advanced" tab instead.
Implementations§
Source§impl ComputedFieldRequest
impl ComputedFieldRequest
Sourcepub fn new(
content_type: String,
label: String,
template: String,
) -> ComputedFieldRequest
pub fn new( content_type: String, label: String, template: String, ) -> ComputedFieldRequest
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 ComputedFieldRequest
impl Clone for ComputedFieldRequest
Source§fn clone(&self) -> ComputedFieldRequest
fn clone(&self) -> ComputedFieldRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more