shuup.admin.modules.products package

Subpackages

Submodules

shuup.admin.modules.products.mass_actions module

class shuup.admin.modules.products.mass_actions.VisibleMassAction[source]

Bases: PicotableMassAction

label = 'Set visible'
identifier = 'mass_action_product_visible'
process(request, ids)[source]

Process the given ids in masses.

Parameters:
  • requestWSGIRequest

  • ids – list of ids.

Returns:

None

class shuup.admin.modules.products.mass_actions.InvisibleMassAction[source]

Bases: PicotableMassAction

label = 'Set invisible'
identifier = 'mass_action_product_invisible'
process(request, ids)[source]

Process the given ids in masses.

Parameters:
  • requestWSGIRequest

  • ids – list of ids.

Returns:

None

class shuup.admin.modules.products.mass_actions.ExportProductsCSVAction[source]

Bases: BaseExportCSVMassAction

identifier = 'mass_action_export_product_csv'
model

alias of ShopProduct

view_class

alias of ProductListView

filename = 'products.csv'
class shuup.admin.modules.products.mass_actions.EditProductAttributesAction[source]

Bases: PicotableRedirectMassAction

label = 'Edit products'
identifier = 'mass_action_edit_product'
redirect_url = '/sa/products/mass-edit/'

shuup.admin.modules.products.sections module

class shuup.admin.modules.products.sections.ProductOrdersSection[source]

Bases: Section

identifier: str = 'product_orders'
name: str | Any = 'Orders'
icon: str = 'fa-inbox'
template: str = 'shuup/admin/products/_product_orders.jinja'
order: int = 1
classmethod visible_for_object(product, request=None)[source]

Returns whether this sections must be visible for the provided object (e.g. order).

:return whether this section must be shown in order section list, defaults to false :rtype: bool

classmethod get_context_data(product, request=None)[source]

Returns additional information to be used in the template.

To fetch this data in the template, you must first add it to your request’s context

e.g. `context[admin_order_section.identifier] =

admin_order_section.get_context_data(self.object)`

:return additional context data :rtype: object|None

shuup.admin.modules.products.signal_handlers module

shuup.admin.modules.products.signal_handlers.update_categories_post_save(sender, instance, **kwargs)[source]
shuup.admin.modules.products.signal_handlers.update_categories_through(sender, instance, **kwargs)[source]
shuup.admin.modules.products.signal_handlers.set_shop_product_category(instance)[source]

shuup.admin.modules.products.utils module

shuup.admin.modules.products.utils.clear_existing_package(parent_product)[source]

Utility function for clearing existing package.

Module contents

class shuup.admin.modules.products.ProductModule[source]

Bases: AdminModule

name = 'Products'
breadcrumbs_menu_entry = <shuup.admin.base.MenuEntry object>
get_urls()[source]
Return type:

list[django.urls.RegexURLPattern]

get_menu_entries(request)[source]
Return type:

list[shuup.admin.base.MenuEntry]

get_search_results(request, query)[source]
Return type:

list[shuup.admin.base.SearchResult]

get_help_blocks(request, kind)[source]
Parameters:
  • request (django.http.request.HttpRequest) – Request.

  • kind (str) – block kind. Currently “setup” or “quicklink”.

Return type:

list[shuup.admin.views.home.HelpBlock]

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