shuup.discounts.admin.views package

Module contents

class shuup.discounts.admin.views.ArchivedDiscountListView[source]

Bases: DiscountListView

get_context_data(**kwargs)[source]

Get the context for this view.

get_object_url(instance)[source]
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 case QuerySet specific behavior will be enabled.

mass_actions = ['shuup.discounts.admin.mass_actions:UnarchiveMassAction', 'shuup.discounts.admin.mass_actions:DeleteMassAction']
class shuup.discounts.admin.views.DiscountDeleteView(**kwargs)[source]

Bases: DetailView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

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.

model

alias of Discount

post(request, *args, **kwargs)[source]
class shuup.discounts.admin.views.DiscountEditView(**kwargs)[source]

Bases: CreateOrUpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

context_object_name = 'discounts'
form_class

alias of DiscountForm

get_breadcrumb_parents()[source]
get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

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.

get_toolbar()[source]
model

alias of Discount

template_name = 'shuup/discounts/discount_edit.jinja'
class shuup.discounts.admin.views.DiscountListView[source]

Bases: PicotableListView

default_columns = [<Column: Discount Name> name, <Column: Product> product__translations__name, <Column: Category> category, <Column: Contact Group> contact_group, <Column: Contact> contact, <Column: Effect> discount_effect, <Column: End Date and Time> end_datetime]
format_end_datetime(instance, *args, **kwargs)[source]
get_discount_effect(instance)[source]
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 case QuerySet specific behavior will be enabled.

mass_actions = ['shuup.discounts.admin.mass_actions:ArchiveMassAction']
mass_actions_provider_key: str | None = 'discount_list_actions_provider'
model

alias of Discount

toolbar_buttons_provider_key: str | None = 'discount_list_toolbar_provider'
url_identifier = 'discounts'
class shuup.discounts.admin.views.HappyHourEditView(**kwargs)[source]

Bases: CreateOrUpdateView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

context_object_name = 'discounts'
form_class

alias of HappyHourForm

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

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.

get_toolbar()[source]
model

alias of HappyHour

template_name = 'shuup/discounts/edit.jinja'
class shuup.discounts.admin.views.HappyHourDeleteView(**kwargs)[source]

Bases: DetailView

Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.

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.

model

alias of HappyHour

post(request, *args, **kwargs)[source]
class shuup.discounts.admin.views.HappyHourListView[source]

Bases: PicotableListView

default_columns = [<Column: Happy Hour Name> name]
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 case QuerySet specific behavior will be enabled.

model

alias of HappyHour

url_identifier = 'discounts_happy_hour'