pub struct BulkWritableCustomLinkRequest {
pub id: Uuid,
pub content_type: String,
pub name: String,
pub text: String,
pub target_url: String,
pub weight: Option<i32>,
pub group_name: Option<String>,
pub button_class: Option<ButtonClassEnum>,
pub new_window: bool,
}Expand description
BulkWritableCustomLinkRequest : 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: Uuid§content_type: String§name: String§text: StringJinja2 template code for link text. Reference the object as {{ obj }} such as {{ obj.platform.name }}. Links which render as empty text will not be displayed.
target_url: StringJinja2 template code for link URL. Reference the object as {{ obj }} such as {{ obj.platform.name }}.
weight: Option<i32>§group_name: Option<String>Links with the same group will appear as a dropdown menu
new_window: boolForce link to open in a new window
Implementations§
Source§impl BulkWritableCustomLinkRequest
impl BulkWritableCustomLinkRequest
Sourcepub fn new(
id: Uuid,
content_type: String,
name: String,
text: String,
target_url: String,
new_window: bool,
) -> BulkWritableCustomLinkRequest
pub fn new( id: Uuid, content_type: String, name: String, text: String, target_url: String, new_window: bool, ) -> BulkWritableCustomLinkRequest
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 BulkWritableCustomLinkRequest
impl Clone for BulkWritableCustomLinkRequest
Source§fn clone(&self) -> BulkWritableCustomLinkRequest
fn clone(&self) -> BulkWritableCustomLinkRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for BulkWritableCustomLinkRequest
impl Default for BulkWritableCustomLinkRequest
Source§fn default() -> BulkWritableCustomLinkRequest
fn default() -> BulkWritableCustomLinkRequest
Source§impl<'de> Deserialize<'de> for BulkWritableCustomLinkRequest
impl<'de> Deserialize<'de> for BulkWritableCustomLinkRequest
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 BulkWritableCustomLinkRequest
impl PartialEq for BulkWritableCustomLinkRequest
Source§fn eq(&self, other: &BulkWritableCustomLinkRequest) -> bool
fn eq(&self, other: &BulkWritableCustomLinkRequest) -> bool
self and other values to be equal, and is used by ==.