pub struct JobButton {Show 17 fields
pub id: Option<Uuid>,
pub object_type: Option<String>,
pub display: Option<String>,
pub url: Option<String>,
pub natural_slug: Option<String>,
pub content_types: Vec<String>,
pub name: String,
pub enabled: Option<bool>,
pub text: String,
pub weight: Option<i32>,
pub group_name: Option<String>,
pub button_class: Option<ButtonClassEnum>,
pub confirmation: Option<bool>,
pub job: Box<BulkWritableJobButtonRequestJob>,
pub created: Option<Option<String>>,
pub last_updated: Option<Option<String>>,
pub notes_url: Option<String>,
}Expand description
JobButton : 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>§object_type: Option<String>§display: Option<String>Human friendly display value
url: Option<String>§natural_slug: Option<String>§content_types: Vec<String>§name: String§enabled: Option<bool>§text: StringJinja2 template code for button text. Reference the object as {{ obj }} such as {{ obj.platform.name }}. Buttons which render as empty text will not be displayed.
weight: Option<i32>§group_name: Option<String>Buttons with the same group will appear as a dropdown menu. Group dropdown buttons will inherit the button class from the button with the lowest weight in the group.
confirmation: Option<bool>Enable confirmation pop-up box. WARNING: unselecting this option will allow the Job to run (and commit changes) with a single click!
job: Box<BulkWritableJobButtonRequestJob>§created: Option<Option<String>>§last_updated: Option<Option<String>>§notes_url: Option<String>Implementations§
Source§impl JobButton
impl JobButton
Sourcepub fn new(
content_types: Vec<String>,
name: String,
text: String,
job: BulkWritableJobButtonRequestJob,
) -> JobButton
pub fn new( content_types: Vec<String>, name: String, text: String, job: BulkWritableJobButtonRequestJob, ) -> JobButton
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)