pub struct JobButtonRequest {
pub id: Option<Uuid>,
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>,
}Expand description
JobButtonRequest : 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: 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>Implementations§
Source§impl JobButtonRequest
impl JobButtonRequest
Sourcepub fn new(
content_types: Vec<String>,
name: String,
text: String,
job: BulkWritableJobButtonRequestJob,
) -> JobButtonRequest
pub fn new( content_types: Vec<String>, name: String, text: String, job: BulkWritableJobButtonRequestJob, ) -> JobButtonRequest
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 JobButtonRequest
impl Clone for JobButtonRequest
Source§fn clone(&self) -> JobButtonRequest
fn clone(&self) -> JobButtonRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more