shuup.campaigns.admin_module.views package

Module contents

class shuup.campaigns.admin_module.views.CatalogCampaignEditView(**kwargs)[source]

Bases: BreadcrumbedView, CampaignEditView

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

base_form_part_classes: List[Type[Any]] = [<class 'shuup.campaigns.admin_module.form_parts.CatalogBaseFormPart'>]
condition_key: str = 'campaign_context_condition'
effects: List[Tuple[str, Type[Any]]] = [('campaign_product_discount_effect_form', <class 'shuup.campaigns.admin_module.form_parts.CatalogEffectsFormPart'>)]
filter_key = 'campaign_catalog_filter'
get_form_parts(object)[source]
model

alias of CatalogCampaign

parent_name = 'Catalog Campaign'
parent_url = 'shuup_admin:catalog_campaign.list'
rules_form_part_class

alias of CatalogConditionsFormPart

class shuup.campaigns.admin_module.views.CatalogCampaignListView[source]

Bases: CampaignListView

get_context_data(**kwargs)[source]

Get the context for this view.

model

alias of CatalogCampaign

class shuup.campaigns.admin_module.views.BasketCampaignEditView(**kwargs)[source]

Bases: BreadcrumbedView, CampaignEditView

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

base_form_part_classes: List[Type[Any]] = [<class 'shuup.campaigns.admin_module.form_parts.BasketBaseFormPart'>]
condition_key: str = 'campaign_basket_condition'
effects: List[Tuple[str, Type[Any]]] = [('campaign_basket_discount_effect_form', <class 'shuup.campaigns.admin_module.form_parts.BasketDiscountEffectsFormPart'>), ('campaign_basket_line_effect_form', <class 'shuup.campaigns.admin_module.form_parts.BasketLineEffectsFormPart'>)]
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 BasketCampaign

parent_name = 'Basket Campaign'
parent_url = 'shuup_admin:basket_campaign.list'
rules_form_part_class

alias of BasketConditionsFormPart

class shuup.campaigns.admin_module.views.BasketCampaignListView[source]

Bases: CampaignListView

get_context_data(**kwargs)[source]

Get the context for this view.

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 BasketCampaign

class shuup.campaigns.admin_module.views.CouponEditView(**kwargs)[source]

Bases: BreadcrumbedView, CreateOrUpdateView

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

add_form_errors_as_messages = True
context_object_name = 'coupon'
form_class

alias of CouponForm

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.

model

alias of Coupon

parent_name = 'Coupon'
parent_url = 'shuup_admin:coupon.list'
template_name = 'shuup/campaigns/admin/edit_coupons.jinja'
class shuup.campaigns.admin_module.views.CouponListView[source]

Bases: PicotableListView

default_columns = [<Column: Code> code, <Column: Usages> usages, <Column: Usages Limit per contact> usage_limit_customer, <Column: Usage Limit> usage_limit, <Column: Active> active, <Column: Created by> created_by, <Column: Date created> created_on]
get_context_data(**kwargs)[source]

Get the context for this view.

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.

get_usages(instance, *args, **kwargs)[source]
model

alias of Coupon