shuup.notify.admin_module.views package
Submodules
shuup.notify.admin_module.views.delete module
shuup.notify.admin_module.views.edit module
- class shuup.notify.admin_module.views.edit.ScriptEditView(**kwargs)[source]
Bases:
CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- form_class
alias of
ScriptForm
- template_name = 'notify/admin/edit_script.jinja'
- context_object_name = 'script'
shuup.notify.admin_module.views.editor module
- class shuup.notify.admin_module.views.editor.ScriptAPI(request, script)[source]
Bases:
object
- Parameters:
request (django.http.HttpRequest) – Request.
script (shuup.notify.models.Script) – Script.
- __init__(request, script)[source]
- Parameters:
request (django.http.HttpRequest) – Request.
script (shuup.notify.models.Script) – Script.
- class shuup.notify.admin_module.views.editor.EditScriptContentView(**kwargs)[source]
Bases:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'notify/admin/script_content_editor.jinja'
- context_object_name = 'script'
shuup.notify.admin_module.views.email_template module
- class shuup.notify.admin_module.views.email_template.EmailTemplateForm(**kwargs)[source]
Bases:
ShuupAdminFormNoTranslation
- class Meta[source]
Bases:
object
- model
alias of
EmailTemplate
- fields = ('name', 'template')
- widgets = {'template': <class 'shuup.admin.forms.widgets.CodeEditorWithHTMLPreview'>}
- base_fields = {'name': <django.forms.fields.CharField object>, 'template': <django.forms.fields.CharField object>}
- declared_fields = {}
- property media
Return all media required to render the widgets on this form.
- class shuup.notify.admin_module.views.email_template.EmailTemplateEditView(**kwargs)[source]
Bases:
CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- model
alias of
EmailTemplate
- form_class
alias of
EmailTemplateForm
- template_name = 'notify/admin/email_template_edit.jinja'
- context_object_name = 'email_template'
- class shuup.notify.admin_module.views.email_template.EmailTemplateDeleteView(**kwargs)[source]
Bases:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- model
alias of
EmailTemplate
- class shuup.notify.admin_module.views.email_template.EmailTemplateListView[source]
Bases:
PicotableListView
- model
alias of
EmailTemplate
- url_identifier = 'notify.email_template'
- default_columns = [<Column: Name> name]
shuup.notify.admin_module.views.list module
- class shuup.notify.admin_module.views.list.ScriptListView[source]
Bases:
PicotableListView
- template_name = 'notify/admin/list_script.jinja'
- default_columns = [<Column: Name> name, <Column: Event> event_identifier, <Column: Enabled> enabled]
- get_object_abstract(instance, item)[source]
Get the object abstract lines (used for mobile layouts) for this object.
Supported keys in abstract line dicts are:
text (required)
title
class (CSS class name –
header
for instance)raw (boolean; whether or not the
text
is raw HTML)
- Parameters:
instance – The instance.
item – The item dict so far. Useful for reusing precalculated values.
- Returns:
Iterable of dicts to pass through to the picotable javascript.
- Return type:
Iterable[dict]
shuup.notify.admin_module.views.template module
- class shuup.notify.admin_module.views.template.EditScriptMode[source]
Bases:
object
- CREATE = 'create'
- MODIFY = 'modify'
- class shuup.notify.admin_module.views.template.ScriptTemplateView(**kwargs)[source]
Bases:
TemplateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'notify/admin/script_templates.jinja'
- class shuup.notify.admin_module.views.template.ScriptTemplateConfigView(**kwargs)[source]
Bases:
FormView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'notify/admin/script_template_config.jinja'
- success_url = 'shuup_admin:notify.script.list'
- dispatch(request, *args, **kwargs)[source]
Check if the request parameter
id
has a valid script template.
- class shuup.notify.admin_module.views.template.ScriptTemplateEditView(**kwargs)[source]
Bases:
FormView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'notify/admin/script_template_config.jinja'
- success_url = 'shuup_admin:notify.script.list'
- instance = None
- dispatch(request, *args, **kwargs)[source]
Check if the request parameter
pk
has a valid templated Script instance.
Module contents
- class shuup.notify.admin_module.views.ScriptEditView(**kwargs)[source]
Bases:
CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- context_object_name = 'script'
- form_class
alias of
ScriptForm
- get_queryset()[source]
Return the
QuerySet
that will be used to look up the object.This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.
- template_name = 'notify/admin/edit_script.jinja'
- class shuup.notify.admin_module.views.EditScriptContentView(**kwargs)[source]
Bases:
DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- context_object_name = 'script'
- template_name = 'notify/admin/script_content_editor.jinja'
- class shuup.notify.admin_module.views.ScriptListView[source]
Bases:
PicotableListView
- default_columns = [<Column: Name> name, <Column: Event> event_identifier, <Column: Enabled> enabled]
- get_object_abstract(instance, item)[source]
Get the object abstract lines (used for mobile layouts) for this object.
Supported keys in abstract line dicts are:
text (required)
title
class (CSS class name –
header
for instance)raw (boolean; whether or not the
text
is raw HTML)
- Parameters:
instance – The instance.
item – The item dict so far. Useful for reusing precalculated values.
- Returns:
Iterable of dicts to pass through to the picotable javascript.
- Return type:
Iterable[dict]
- get_queryset()[source]
Return the list of items for this view.
The return value must be an iterable and may be an instance of
QuerySet
in which caseQuerySet
specific behavior will be enabled.
- template_name = 'notify/admin/list_script.jinja'
- class shuup.notify.admin_module.views.ScriptTemplateView(**kwargs)[source]
Bases:
TemplateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- post(request)[source]
Create the Script from template directly if the template does not have a bound form.
If the script template has a bound form, redirect to the template configuration view.
If no script template is found, redirect to the script list.
- template_name = 'notify/admin/script_templates.jinja'
- class shuup.notify.admin_module.views.ScriptTemplateConfigView(**kwargs)[source]
Bases:
FormView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- dispatch(request, *args, **kwargs)[source]
Check if the request parameter
id
has a valid script template.
- form_valid(form)[source]
Create the script from the template using the configuration from the form.
- success_url = 'shuup_admin:notify.script.list'
- template_name = 'notify/admin/script_template_config.jinja'
- class shuup.notify.admin_module.views.ScriptTemplateEditView(**kwargs)[source]
Bases:
FormView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- dispatch(request, *args, **kwargs)[source]
Check if the request parameter
pk
has a valid templated Script instance.
- form_valid(form)[source]
Create the script from the template using the configuration from the form.
- instance = None
- success_url = 'shuup_admin:notify.script.list'
- template_name = 'notify/admin/script_template_config.jinja'