shuup.notify.admin_module package

Subpackages

Submodules

shuup.notify.admin_module.forms module

class shuup.notify.admin_module.forms.ScriptForm(**kwargs)[source]

Bases: ModelForm

class Meta[source]

Bases: object

model

alias of Script

fields = ('event_identifier', 'name', 'enabled')
__init__(**kwargs)[source]
save(commit=True)[source]

Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.

base_fields = {'enabled': <django.forms.fields.BooleanField object>, 'event_identifier': <django.forms.fields.ChoiceField object>, 'name': <django.forms.fields.CharField object>}
declared_fields = {'enabled': <django.forms.fields.BooleanField object>, 'event_identifier': <django.forms.fields.ChoiceField object>, 'name': <django.forms.fields.CharField object>}
property media

Return all media required to render the widgets on this form.

class shuup.notify.admin_module.forms.ScriptItemEditForm(*args, **kwargs)[source]

Bases: Form

__init__(*args, **kwargs)[source]
populate_form()[source]
get_initial()[source]
save()[source]
base_fields = {}
declared_fields = {}
property media

Return all media required to render the widgets on this form.

shuup.notify.admin_module.utils module

shuup.notify.admin_module.utils.get_name_map(category_key)[source]
shuup.notify.admin_module.utils.get_enum_choices_dict(enum_class)[source]

Module contents

class shuup.notify.admin_module.NotifyAdminModule[source]

Bases: AdminModule

name = 'Notifications'
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]

mark_notification_read_view(request, pk)[source]
get_notifications(request)[source]
Return type:

list[shuup.admin.base.Notification]

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

class shuup.notify.admin_module.EmailTemplateAdminModule[source]

Bases: AdminModule

name = 'Email Template'
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