shuup.admin.views package

Submodules

shuup.admin.views.auth module

class shuup.admin.views.auth.LogoutView(**kwargs)[source]

Bases: LogoutView

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

template_name = 'shuup/admin/auth/logout.jinja'
class shuup.admin.views.auth.LoginView(**kwargs)[source]

Bases: LoginView

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

form_class

alias of EmailAuthenticationForm

shuup.admin.views.dashboard module

class shuup.admin.views.dashboard.DashboardView(**kwargs)[source]

Bases: TemplateView

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

template_name = 'shuup/admin/dashboard/dashboard.jinja'
get_context_data(**kwargs)[source]
get(request, *args, **kwargs)[source]

shuup.admin.views.edit module

class shuup.admin.views.edit.EditObjectView(**kwargs)[source]

Bases: View

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

get(request)[source]

shuup.admin.views.home module

class shuup.admin.views.home.HelpBlockCategory(value)[source]

Bases: Enum

PRODUCTS = 1
ORDERS = 2
CAMPAIGNS = 3
CONTACTS = 4
STOREFRONT = 5
GENERAL = 200
class shuup.admin.views.home.SimpleHelpBlock(text, **kwargs)[source]

Bases: object

__init__(text, **kwargs)[source]
class shuup.admin.views.home.HomeView(**kwargs)[source]

Bases: TemplateView

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

template_name = 'shuup/admin/home/home.jinja'
get_context_data(**kwargs)[source]

shuup.admin.views.impersonate module

shuup.admin.views.impersonate.stop_impersonating_staff(request)[source]

shuup.admin.views.menu module

class shuup.admin.views.menu.MenuView(**kwargs)[source]

Bases: TemplateView

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

template_name = 'shuup/admin/base/_main_menu.jinja'
class shuup.admin.views.menu.MenuToggleView(**kwargs)[source]

Bases: View

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

post(request, *args, **kwargs)[source]

shuup.admin.views.password module

class shuup.admin.views.password.RequestPasswordView(**kwargs)[source]

Bases: FormView

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

template_name = 'shuup/admin/auth/request_password.jinja'
get_form_class()[source]

Return the form class to use.

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

form_valid(form)[source]

If the form is valid, redirect to the supplied URL.

class shuup.admin.views.password.ResetPasswordView(**kwargs)[source]

Bases: FormView

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

template_name = 'shuup/admin/auth/reset_password.jinja'
success_url = '/sa/'
token_generator = <django.contrib.auth.tokens.PasswordResetTokenGenerator object>
get_form_class()[source]

Return the form class to use.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

get_target_user()[source]
dispatch(request, *args, **kwargs)[source]
form_valid(form)[source]

If the form is valid, redirect to the supplied URL.

shuup.admin.views.search module

shuup.admin.views.search.get_search_results(request, query)[source]
class shuup.admin.views.search.SearchView(**kwargs)[source]

Bases: View

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

get(request, *args, **kwargs)[source]

shuup.admin.views.select module

class shuup.admin.views.select.MultiselectAjaxView(**kwargs)[source]

Bases: TemplateView

This view is deprecated and it will be removed on version 3.

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

model = None
search_fields: List[str] = []
result_limit = 20
init_search_fields(cls)[source]

Configure the fields to use for searching.

If the cls object has a search_fields attribute, it will be used, otherwise, the class will be inspected and the attribute name or translations__name will mainly be used.

Other fields will be used for already known cls instances.

get_data(request, *args, **kwargs)[source]
get(request, *args, **kwargs)[source]
class shuup.admin.views.select.ObjectSelectorView(**kwargs)[source]

Bases: TemplateView

Base class for responding to searches from select2 components.

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

get(request, *args, **kwargs)[source]
class shuup.admin.views.select.BaseAdminObjectSelector(selector, shop, user, supplier=None, *args, **kwargs)[source]

Bases: object

search_limit = 20
model: Type[Any] | None = None
__init__(selector, shop, user, supplier=None, *args, **kwargs)[source]
classmethod get_selector_for_model(model)[source]
classmethod handles_selector(selector) bool[source]
classmethod handle_subclass_selector(selector, parent_model)[source]
has_permission() bool[source]
get_objects(search_term, *args, **kwargs) Iterable[Tuple[int, str]] | List[Dict[str, Any]][source]

shuup.admin.views.tour module

class shuup.admin.views.tour.TourView(**kwargs)[source]

Bases: View

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

post(request, *args, **kwargs)[source]

shuup.admin.views.wizard module

class shuup.admin.views.wizard.WizardFormDefMixin(**kwargs)[source]

Bases: object

__init__(**kwargs)[source]
class shuup.admin.views.wizard.WizardFormDef(**kwargs)[source]

Bases: WizardFormDefMixin, FormDef

class shuup.admin.views.wizard.TemplatedWizardFormDef(**kwargs)[source]

Bases: WizardFormDefMixin, TemplatedFormDef

class shuup.admin.views.wizard.WizardPane(request, object=None)[source]

Bases: FormPart

identifier = ''
title = ''
text = ''
icon = ''
can_skip = False
editable = True
visible()[source]

Returns whether this pane is visible for editing.

valid()[source]

Returns whether this pane is valid and should be included in wizard pane list.

class shuup.admin.views.wizard.WizardView(**kwargs)[source]

Bases: TemplateView

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

template_name = 'shuup/admin/wizard/wizard.jinja'
panes
get_all_pane_forms()[source]
current_pane
get_final_pane_identifier()[source]
get_context_data(**kwargs)[source]
get_form_group_for_pane(pane)[source]
get_form()[source]
form_valid(form)[source]
form_invalid(form)[source]
post(request, *args, **kwargs)[source]
get(request, *args, **kwargs)[source]

Module contents