shuup.xtheme.admin_module package

Subpackages

Submodules

shuup.xtheme.admin_module.utils module

shuup.xtheme.admin_module.utils.get_theme_context(shop)[source]

shuup.xtheme.admin_module.widgets module

class shuup.xtheme.admin_module.widgets.XthemeCodeEditorWidget(attrs=None)[source]

Bases: Textarea

render(name, value, attrs=None, renderer=None)[source]

Render the widget as an HTML string.

property media

Module contents

class shuup.xtheme.admin_module.XthemeAdminModule[source]

Bases: AdminModule

Admin module for Xtheme.

Allows theme activation/deactivation and further configuration.

name = 'Shuup Extensible Theme Engine'
breadcrumbs_menu_entry = <shuup.admin.base.MenuEntry object>
get_urls()[source]
Return type:

list[django.urls.RegexURLPattern]

get_menu_entries(request)[source]
Return type:

list[shuup.admin.base.MenuEntry]

get_help_blocks(request, kind)[source]
Parameters:
  • request (django.http.request.HttpRequest) – Request.

  • kind (str) – block kind. Currently “setup” or “quicklink”.

Return type:

list[shuup.admin.views.home.HelpBlock]

get_notifications(request)[source]
Return type:

list[shuup.admin.base.Notification]

class shuup.xtheme.admin_module.XthemeFontsAdminModule[source]

Bases: AdminModule

name = 'Shuup Extensible Theme Engine Fonts'
breadcrumbs_menu_entry = <shuup.admin.base.MenuEntry object>
get_urls()[source]
Return type:

list[django.urls.RegexURLPattern]

get_menu_entries(request)[source]
Return type:

list[shuup.admin.base.MenuEntry]

get_model_url(object, kind, shop=None)[source]

Retrieve an admin URL for the given object of the kind kind.

A falsy value must be returned if the module does not know how to reverse the given object.

Parameters:
Returns:

The reversed URL or none.

Return type:

str|None

get_extra_permissions() Iterable[str][source]

Define custom extra permissions for admin module for option to limit certain parts of the admin module based on per user permission string. Should return unique list permission strings across the installation to prevent unwanted side effects.

Return type:

list[str]

get_permissions_help_texts() Iterable[str][source]

Returns a dictionary where the keys is the permission identifier and the value is a help text that can help the user to understand where the permissions is used and how it works.

class shuup.xtheme.admin_module.XthemeSnippetsAdminModule[source]

Bases: AdminModule

name = 'Shuup Extensible Theme Engine Snippets'
breadcrumbs_menu_entry = <shuup.admin.base.MenuEntry object>
get_urls()[source]
Return type:

list[django.urls.RegexURLPattern]

get_menu_entries(request)[source]
Return type:

list[shuup.admin.base.MenuEntry]

get_model_url(object, kind, shop=None)[source]

Retrieve an admin URL for the given object of the kind kind.

A falsy value must be returned if the module does not know how to reverse the given object.

Parameters:
Returns:

The reversed URL or none.

Return type:

str|None