pub struct CustomLinkRequest {
pub object_types: Vec<String>,
pub name: String,
pub enabled: Option<bool>,
pub link_text: String,
pub link_url: String,
pub weight: Option<i32>,
pub group_name: Option<String>,
pub button_class: Option<ButtonClass>,
pub new_window: Option<bool>,
}Expand description
CustomLinkRequest : 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: Vec<String>§name: String§enabled: Option<bool>§link_text: StringJinja2 template code for link text
link_url: StringJinja2 template code for link URL
weight: Option<i32>§group_name: Option<String>Links with the same group will appear as a dropdown menu
The class of the first link in a group will be used for the dropdown button * default - Default * blue - Blue * indigo - Indigo * purple - Purple * pink - Pink * red - Red * orange - Orange * yellow - Yellow * green - Green * teal - Teal * cyan - Cyan * gray - Gray * black - Black * white - White * ghost-dark - Link
new_window: Option<bool>Force link to open in a new window
Implementations§
Source§impl CustomLinkRequest
impl CustomLinkRequest
Sourcepub fn new(
object_types: Vec<String>,
name: String,
link_text: String,
link_url: String,
) -> CustomLinkRequest
pub fn new( object_types: Vec<String>, name: String, link_text: String, link_url: String, ) -> CustomLinkRequest
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 CustomLinkRequest
impl Clone for CustomLinkRequest
Source§fn clone(&self) -> CustomLinkRequest
fn clone(&self) -> CustomLinkRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more