shuup.discounts.admin.modules package

Module contents

class shuup.discounts.admin.modules.DiscountModule[source]

Bases: AdminModule

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_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_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.

get_urls()[source]
Return type:

list[django.urls.RegexURLPattern]

name = 'Discounts'
class shuup.discounts.admin.modules.HappyHourModule[source]

Bases: AdminModule

breadcrumbs_menu_entry = <shuup.admin.base.MenuEntry object>
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_urls()[source]
Return type:

list[django.urls.RegexURLPattern]

name = 'Discounts Happy Hours'
class shuup.discounts.admin.modules.DiscountArchiveModule[source]

Bases: AdminModule

breadcrumbs_menu_entry = <shuup.admin.base.MenuEntry object>
get_menu_entries(request)[source]
Return type:

list[shuup.admin.base.MenuEntry]

get_urls()[source]
Return type:

list[django.urls.RegexURLPattern]

name = 'Archived Product Discounts'