shuup.xtheme.admin_module.views package
Module contents
- class shuup.xtheme.admin_module.views.ActivationForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]
Bases:
Form
A very simple form for activating a theme.
- base_fields = {'activate': <django.forms.fields.CharField object>, 'selected_style': <django.forms.fields.CharField object>}
- declared_fields = {'activate': <django.forms.fields.CharField object>, 'selected_style': <django.forms.fields.CharField object>}
- property media
Return all media required to render the widgets on this form.
- class shuup.xtheme.admin_module.views.FontEditView(**kwargs)[source]
Bases:
CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- context_object_name = 'font'
- 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 = 'shuup/xtheme/admin/font_create.jinja'
- class shuup.xtheme.admin_module.views.AdminThemeForm(*args, **kwargs)[source]
Bases:
ModelForm
- class Meta[source]
Bases:
object
- fields = '__all__'
- labels = {'danger_color': 'Choose the danger (red) style primary color:', 'primary_color': 'Choose the primary color:', 'secondary_color': 'Choose the secondary color:', 'success_color': 'Choose the success (green) style primary color:', 'text_color': 'Choose the primary text color:'}
- model
alias of
AdminThemeSettings
- widgets = {'danger_color': <django.forms.widgets.TextInput object>, 'primary_color': <django.forms.widgets.TextInput object>, 'secondary_color': <django.forms.widgets.TextInput object>, 'success_color': <django.forms.widgets.TextInput object>, 'text_color': <django.forms.widgets.TextInput object>}
- base_fields = {'active': <django.forms.fields.BooleanField object>, 'admin_body_font': <django.forms.models.ModelChoiceField object>, 'admin_header_font': <django.forms.models.ModelChoiceField object>, 'base_font_size': <django.forms.fields.CharField object>, 'danger_color': <django.forms.fields.CharField object>, 'primary_color': <django.forms.fields.CharField object>, 'secondary_color': <django.forms.fields.CharField object>, 'shop': <django.forms.models.ModelChoiceField object>, 'success_color': <django.forms.fields.CharField object>, 'text_color': <django.forms.fields.CharField object>}
- declared_fields = {}
- property media
Return all media required to render the widgets on this form.
- class shuup.xtheme.admin_module.views.AdminThemeConfigDetailView(**kwargs)[source]
Bases:
FormView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- form_class
alias of
AdminThemeForm
- template_name = 'shuup/xtheme/admin/admin_config_detail.jinja'
- class shuup.xtheme.admin_module.views.FontForm(*args, **kwargs)[source]
Bases:
ModelForm
- base_fields = {'css_value': <django.forms.fields.CharField object>, 'eot': <filer.fields.file.AdminFileFormField object>, 'name': <django.forms.fields.CharField object>, 'shop': <django.forms.models.ModelChoiceField object>, 'svg': <filer.fields.file.AdminFileFormField object>, 'ttf': <filer.fields.file.AdminFileFormField object>, 'woff': <filer.fields.file.AdminFileFormField object>, 'woff2': <filer.fields.file.AdminFileFormField object>}
- declared_fields = {}
- property media
Return all media required to render the widgets on this form.
- class shuup.xtheme.admin_module.views.FontListView[source]
Bases:
PicotableListView
- default_columns = [<Column: Name> name, <Column: Woff> woff, <Column: Woff2> woff2, <Column: TTF> ttf, <Column: SVG> svg, <Column: EOT> eot]
- 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.
- url_identifier = 'xtheme.font'
- class shuup.xtheme.admin_module.views.SnippetDeleteView(**kwargs)[source]
Bases:
BaseDeleteView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- delete(request, *args, **kwargs)[source]
Call the delete() method on the fetched object and then redirect to the success URL.
- 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.
- success_url = '/sa/xtheme/snippet/'
- class shuup.xtheme.admin_module.views.SnippetEditView(**kwargs)[source]
Bases:
CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- context_object_name = 'snippet'
- form_class
alias of
SnippetForm
- 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 = 'shuup/xtheme/admin/snippet_edit.jinja'
- class shuup.xtheme.admin_module.views.SnippetListView[source]
Bases:
PicotableListView
- default_columns = [<Column: Name> name, <Column: Location> location, <Column: Type> snippet_type, <Column: Themes> themes]
- 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.
- url_identifier = 'xtheme_snippet'
- class shuup.xtheme.admin_module.views.TemplateView(**kwargs)[source]
Bases:
TemplateResponseMixin
,ContextMixin
,View
Render a template. Pass keyword arguments from the URLconf to the context.
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- class shuup.xtheme.admin_module.views.ThemeConfigDetailView(**kwargs)[source]
Bases:
CreateOrUpdateView
A view for configuring a single theme.
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- add_form_errors_as_messages = True
- context_object_name = 'theme_settings'
- form_class
alias of
Form
- get_object(queryset=None)[source]
Return the object the view is displaying.
Require
self.queryset
and apk
orslug
argument in the URLconf. Subclasses can override this to return any object.
- model
alias of
ThemeSettings
- template_name = 'shuup/xtheme/admin/config_detail.jinja'
- class shuup.xtheme.admin_module.views.ThemeConfigView(**kwargs)[source]
Bases:
FormView
A view for listing and activating themes.
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- form_class
alias of
ActivationForm
- template_name = 'shuup/xtheme/admin/config.jinja'
- class shuup.xtheme.admin_module.views.ThemeGuideTemplateView(**kwargs)[source]
Bases:
TemplateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = None