shuup.front.admin_module.carts.views package

Module contents

class shuup.front.admin_module.carts.views.CartDetailView(**kwargs)[source]

Bases: DetailView

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

get_context_data(**kwargs)[source]

Insert the single object into the context dict.

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 StoredBasket

template_name = 'shuup/front/admin/stored_basket_detail.jinja'
class shuup.front.admin_module.carts.views.CartListView[source]

Bases: PicotableListView

__init__()[source]
default_columns = [<Column: Key> key, <Column: Last updated on> updated_on, <Column: Completed> finished, <Column: Shop> shop, <Column: Supplier> supplier, <Column: Customer> customer, <Column: Product count> product_count, <Column: Total> taxful_total_price]
format_finished_status(instance, *args, **kwargs)[source]
format_taxful_total_price(instance, *args, **kwargs)[source]
format_updated_date(instance, *args, **kwargs)[source]
get_context_data(**kwargs)[source]

Get the context for this view.

get_object_abstract(instance, item)[source]

Get the object abstract lines (used for mobile layouts) for this object.

Supported keys in abstract line dicts are:

  • text (required)

  • title

  • class (CSS class name – header for instance)

  • raw (boolean; whether or not the text is raw HTML)

Parameters:
  • instance – The instance.

  • item – The item dict so far. Useful for reusing precalculated values.

Returns:

Iterable of dicts to pass through to the picotable javascript.

Return type:

Iterable[dict]

get_queryset()[source]

Ignore potentially active carts, displaying only those not updated for at least 2 hours.

mass_actions_provider_key: str | None = 'cart_list_actions_provider'
model

alias of StoredBasket

toolbar_buttons_provider_key: str | None = 'cart_list_toolbar_provider'