shuup.admin.modules.contacts.views package

Submodules

shuup.admin.modules.contacts.views.detail module

class shuup.admin.modules.contacts.views.detail.ContactDetailToolbar(contact, request)[source]

Bases: Toolbar

__init__(contact, request)[source]
build_renew_password_button()[source]
build_new_user_button()[source]
build_new_order_button()[source]
build_deactivate_button()[source]
build_user_button()[source]
build_provides_buttons()[source]
build_login_as_button()[source]
build()[source]
class shuup.admin.modules.contacts.views.detail.ContactDetailView(**kwargs)[source]

Bases: DetailView

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

model

alias of Contact

template_name = 'shuup/admin/contacts/detail.jinja'
context_object_name = 'contact'
get_object(*args, **kwargs)[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

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_context_data(**kwargs)[source]

Insert the single object into the context dict.

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

shuup.admin.modules.contacts.views.edit module

class shuup.admin.modules.contacts.views.edit.ContactEditView(**kwargs)[source]

Bases: SaveFormPartsMixin, FormPartsViewMixin, CreateOrUpdateView

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

model

alias of Contact

template_name = 'shuup/admin/contacts/edit.jinja'
context_object_name = 'contact'
form_part_class_provide_key: str | None = 'admin_contact_form_part'
get_object(queryset=None)[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

get_contact_type()[source]
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_form_part_classes()[source]
form_valid(form)[source]

If the form is valid, save the associated model.

get_toolbar()[source]
get_context_data(**kwargs)[source]

Insert the form into the context dict.

shuup.admin.modules.contacts.views.list module

class shuup.admin.modules.contacts.views.list.ContactTypeFilter[source]

Bases: ChoicesFilter

__init__()[source]
filter_queryset(queryset, column, value, context)[source]
class shuup.admin.modules.contacts.views.list.ContactListView[source]

Bases: PicotableListView

model

alias of Contact

default_columns = [<Column: Name> name, <Column: Type> type, <Column: Email> email, <Column: Phone> phone, <Column: Active> is_active, <Column: # Orders> n_orders, <Column: Groups> groups, <Column: Shops> shops, <Column: Registered in> registration_shop]
mass_actions = ['shuup.admin.modules.contacts.mass_actions:EditContactsAction', 'shuup.admin.modules.contacts.mass_actions:EditContactGroupsAction', 'shuup.admin.modules.contacts.mass_actions:ExportContactsCSVAction']
toolbar_buttons_provider_key: str | None = 'contact_list_toolbar_provider'
mass_actions_provider_key: str | None = 'contact_list_mass_actions_provider'
__init__()[source]
get_groups()[source]
get_shops()[source]
get_toolbar()[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.

get_type_display(instance)[source]
get_groups_display(instance)[source]
get_shops_display(instance)[source]
get_object_abstract(instance, item)[source]

shuup.admin.modules.contacts.views.mass_edit module

class shuup.admin.modules.contacts.views.mass_edit.ContactMassEditView(**kwargs)[source]

Bases: MassEditMixin, FormView

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

title = 'Mass Edit: Contacts'
form_class

alias of MassEditForm

form_valid(form)[source]

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

class shuup.admin.modules.contacts.views.mass_edit.ContactGroupMassEditView(**kwargs)[source]

Bases: MassEditMixin, FormView

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

title = 'Mass Edit: Contact Groups'
form_class

alias of GroupMassEditForm

form_valid(form)[source]

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

shuup.admin.modules.contacts.views.reset module

class shuup.admin.modules.contacts.views.reset.ContactResetPasswordView(**kwargs)[source]

Bases: UserResetPasswordView

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

get_contact()[source]
get_object(queryset=None)[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

get_success_url()[source]

Module contents

class shuup.admin.modules.contacts.views.ContactListView[source]

Bases: PicotableListView

__init__()[source]
default_columns = [<Column: Name> name, <Column: Type> type, <Column: Email> email, <Column: Phone> phone, <Column: Active> is_active, <Column: # Orders> n_orders, <Column: Groups> groups, <Column: Shops> shops, <Column: Registered in> registration_shop]
get_groups()[source]
get_groups_display(instance)[source]
get_object_abstract(instance, item)[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.

get_shops()[source]
get_shops_display(instance)[source]
get_toolbar()[source]
get_type_display(instance)[source]
mass_actions = ['shuup.admin.modules.contacts.mass_actions:EditContactsAction', 'shuup.admin.modules.contacts.mass_actions:EditContactGroupsAction', 'shuup.admin.modules.contacts.mass_actions:ExportContactsCSVAction']
mass_actions_provider_key: str | None = 'contact_list_mass_actions_provider'
model

alias of Contact

toolbar_buttons_provider_key: str | None = 'contact_list_toolbar_provider'
class shuup.admin.modules.contacts.views.ContactDetailView(**kwargs)[source]

Bases: DetailView

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

context_object_name = 'contact'
get_context_data(**kwargs)[source]

Insert the single object into the context dict.

get_object(*args, **kwargs)[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

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 Contact

post(request, *args, **kwargs)[source]
template_name = 'shuup/admin/contacts/detail.jinja'
class shuup.admin.modules.contacts.views.ContactResetPasswordView(**kwargs)[source]

Bases: UserResetPasswordView

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

get_contact()[source]
get_object(queryset=None)[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

get_success_url()[source]
class shuup.admin.modules.contacts.views.ContactEditView(**kwargs)[source]

Bases: SaveFormPartsMixin, FormPartsViewMixin, CreateOrUpdateView

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

context_object_name = 'contact'
form_part_class_provide_key: str | None = 'admin_contact_form_part'
form_valid(form)[source]

If the form is valid, save the associated model.

get_contact_type()[source]
get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form_part_classes()[source]
get_object(queryset=None)[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

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 Contact

template_name = 'shuup/admin/contacts/edit.jinja'
class shuup.admin.modules.contacts.views.ContactGroupMassEditView(**kwargs)[source]

Bases: MassEditMixin, FormView

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

form_class

alias of GroupMassEditForm

form_valid(form)[source]

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

title = 'Mass Edit: Contact Groups'
class shuup.admin.modules.contacts.views.ContactMassEditView(**kwargs)[source]

Bases: MassEditMixin, FormView

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

form_class

alias of MassEditForm

form_valid(form)[source]

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

title = 'Mass Edit: Contacts'