pub struct ExportTemplateRequest {
pub object_types: Vec<String>,
pub name: String,
pub description: Option<String>,
pub environment_params: Option<Option<Value>>,
pub template_code: String,
pub mime_type: Option<String>,
pub file_name: Option<String>,
pub file_extension: Option<String>,
pub as_attachment: Option<bool>,
pub data_source: Option<Box<ConfigContextProfileRequestDataSource>>,
}Expand description
ExportTemplateRequest : 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§description: Option<String>§environment_params: Option<Option<Value>>Any additional parameters (https://jinja.palletsprojects.com/en/stable/api/#jinja2.Environment) to pass when constructing the Jinja environment
template_code: StringJinja template code.
mime_type: Option<String>Defaults to text/plain; charset=utf-8
file_name: Option<String>Filename to give to the rendered export file
file_extension: Option<String>Extension to append to the rendered filename
as_attachment: Option<bool>Download file as attachment
data_source: Option<Box<ConfigContextProfileRequestDataSource>>Implementations§
Source§impl ExportTemplateRequest
impl ExportTemplateRequest
Sourcepub fn new(
object_types: Vec<String>,
name: String,
template_code: String,
) -> ExportTemplateRequest
pub fn new( object_types: Vec<String>, name: String, template_code: String, ) -> ExportTemplateRequest
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 ExportTemplateRequest
impl Clone for ExportTemplateRequest
Source§fn clone(&self) -> ExportTemplateRequest
fn clone(&self) -> ExportTemplateRequest
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more