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:
- 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:
object (django.db.models.Model) – A object instance (or object class).
kind (str) – URL kind. Currently “detail”, “list” or “new”.
shop (shuup.core.models.Shop|None) – The shop that owns the resource.
- 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.
- name = 'Discounts'
- class shuup.discounts.admin.modules.HappyHourModule[source]
Bases:
AdminModule
- Return type:
- 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:
object (django.db.models.Model) – A object instance (or object class).
kind (str) – URL kind. Currently “detail”, “list” or “new”.
shop (shuup.core.models.Shop|None) – The shop that owns the resource.
- Returns:
The reversed URL or none.
- Return type:
str|None
- name = 'Discounts Happy Hours'
- class shuup.discounts.admin.modules.DiscountArchiveModule[source]
Bases:
AdminModule
- Return type:
- name = 'Archived Product Discounts'