shuup.admin.modules.contacts package
Subpackages
- shuup.admin.modules.contacts.views package
- Submodules
- shuup.admin.modules.contacts.views.detail module
ContactDetailToolbar
ContactDetailToolbar.__init__
ContactDetailToolbar.build_renew_password_button
ContactDetailToolbar.build_new_user_button
ContactDetailToolbar.build_new_order_button
ContactDetailToolbar.build_deactivate_button
ContactDetailToolbar.build_user_button
ContactDetailToolbar.build_provides_buttons
ContactDetailToolbar.build_login_as_button
ContactDetailToolbar.build
ContactDetailView
- shuup.admin.modules.contacts.views.edit module
ContactEditView
ContactEditView.model
ContactEditView.template_name
ContactEditView.context_object_name
ContactEditView.form_part_class_provide_key
ContactEditView.get_object
ContactEditView.get_contact_type
ContactEditView.get_queryset
ContactEditView.get_form_part_classes
ContactEditView.form_valid
ContactEditView.get_toolbar
ContactEditView.get_context_data
- shuup.admin.modules.contacts.views.list module
ContactTypeFilter
ContactListView
ContactListView.model
ContactListView.default_columns
ContactListView.mass_actions
ContactListView.toolbar_buttons_provider_key
ContactListView.mass_actions_provider_key
ContactListView.__init__
ContactListView.get_groups
ContactListView.get_shops
ContactListView.get_toolbar
ContactListView.get_queryset
ContactListView.get_type_display
ContactListView.get_groups_display
ContactListView.get_shops_display
ContactListView.get_object_abstract
- shuup.admin.modules.contacts.views.mass_edit module
- shuup.admin.modules.contacts.views.reset module
- Module contents
ContactListView
ContactListView.__init__
ContactListView.default_columns
ContactListView.get_groups
ContactListView.get_groups_display
ContactListView.get_object_abstract
ContactListView.get_queryset
ContactListView.get_shops
ContactListView.get_shops_display
ContactListView.get_toolbar
ContactListView.get_type_display
ContactListView.mass_actions
ContactListView.mass_actions_provider_key
ContactListView.model
ContactListView.toolbar_buttons_provider_key
ContactDetailView
ContactResetPasswordView
ContactEditView
ContactEditView.context_object_name
ContactEditView.form_part_class_provide_key
ContactEditView.form_valid
ContactEditView.get_contact_type
ContactEditView.get_context_data
ContactEditView.get_form_part_classes
ContactEditView.get_object
ContactEditView.get_queryset
ContactEditView.get_toolbar
ContactEditView.model
ContactEditView.template_name
ContactGroupMassEditView
ContactMassEditView
Submodules
shuup.admin.modules.contacts.form_parts module
- class shuup.admin.modules.contacts.form_parts.CompanyContactBaseFormPart(request, object=None)[source]
Bases:
FormPart
shuup.admin.modules.contacts.forms module
- class shuup.admin.modules.contacts.forms.ContactBaseFormMixin(*args, **kwargs)[source]
Bases:
object
- class shuup.admin.modules.contacts.forms.PersonContactBaseForm(user=None, *args, **kwargs)[source]
Bases:
ContactBaseFormMixin
,ModelForm
- class Meta[source]
Bases:
object
- model
alias of
PersonContact
- fields = ['first_name', 'last_name', 'gender', 'language', 'birth_date', 'is_active', 'marketing_permission', 'phone', 'www', 'timezone', 'prefix', 'suffix', 'name_ext', 'email', 'tax_group', 'merchant_notes', 'account_manager', 'picture']
- save(commit=True)[source]
Save this form’s self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance.
- base_fields = {'account_manager': <django.forms.models.ModelChoiceField object>, 'birth_date': <django.forms.fields.DateField object>, 'email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'gender': <enumfields.forms.EnumChoiceField object>, 'is_active': <django.forms.fields.BooleanField object>, 'language': <shuup.core.fields.LanguageFormField object>, 'last_name': <django.forms.fields.CharField object>, 'marketing_permission': <django.forms.fields.BooleanField object>, 'merchant_notes': <django.forms.fields.CharField object>, 'name_ext': <django.forms.fields.CharField object>, 'phone': <django.forms.fields.CharField object>, 'picture': <filer.fields.image.AdminImageFormField object>, 'prefix': <django.forms.fields.CharField object>, 'suffix': <django.forms.fields.CharField object>, 'tax_group': <django.forms.models.ModelChoiceField object>, 'timezone': <django.forms.fields.TypedChoiceField object>, 'www': <django.forms.fields.URLField object>}
- declared_fields = {'language': <shuup.core.fields.LanguageFormField object>}
- property media
Return all media required to render the widgets on this form.
- class shuup.admin.modules.contacts.forms.CompanyContactBaseForm(*args, **kwargs)[source]
Bases:
ContactBaseFormMixin
,ModelForm
- class Meta[source]
Bases:
object
- model
alias of
CompanyContact
- fields = ['name', 'tax_number', 'members', 'is_active', 'marketing_permission', 'phone', 'www', 'timezone', 'prefix', 'suffix', 'name_ext', 'email', 'tax_group', 'merchant_notes', 'account_manager', 'picture']
- base_fields = {'account_manager': <django.forms.models.ModelChoiceField object>, 'email': <django.forms.fields.EmailField object>, 'is_active': <django.forms.fields.BooleanField object>, 'marketing_permission': <django.forms.fields.BooleanField object>, 'members': <django.forms.models.ModelMultipleChoiceField object>, 'merchant_notes': <django.forms.fields.CharField object>, 'name': <django.forms.fields.CharField object>, 'name_ext': <django.forms.fields.CharField object>, 'phone': <django.forms.fields.CharField object>, 'picture': <filer.fields.image.AdminImageFormField object>, 'prefix': <django.forms.fields.CharField object>, 'suffix': <django.forms.fields.CharField object>, 'tax_group': <django.forms.models.ModelChoiceField object>, 'tax_number': <django.forms.fields.CharField object>, 'timezone': <django.forms.fields.TypedChoiceField object>, 'www': <django.forms.fields.URLField object>}
- declared_fields = {}
- property media
Return all media required to render the widgets on this form.
- class shuup.admin.modules.contacts.forms.MassEditForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]
Bases:
Form
- base_fields = {'account_manager': <django.forms.models.ModelChoiceField object>, 'gender': <enumfields.forms.EnumChoiceField object>, 'language': <django_countries.fields.LazyTypedChoiceField object>, 'members': <django.forms.models.ModelMultipleChoiceField object>, 'merchant_notes': <django.forms.fields.CharField object>, 'tax_number': <django.forms.fields.CharField object>, 'www': <django.forms.fields.URLField object>}
- declared_fields = {'account_manager': <django.forms.models.ModelChoiceField object>, 'gender': <enumfields.forms.EnumChoiceField object>, 'language': <django_countries.fields.LazyTypedChoiceField object>, 'members': <django.forms.models.ModelMultipleChoiceField object>, 'merchant_notes': <django.forms.fields.CharField object>, 'tax_number': <django.forms.fields.CharField object>, 'www': <django.forms.fields.URLField object>}
- property media
Return all media required to render the widgets on this form.
- class shuup.admin.modules.contacts.forms.GroupMassEditForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]
Bases:
Form
- base_fields = {'contact_group': <django.forms.models.ModelMultipleChoiceField object>}
- declared_fields = {'contact_group': <django.forms.models.ModelMultipleChoiceField object>}
- property media
Return all media required to render the widgets on this form.
shuup.admin.modules.contacts.mass_actions module
- class shuup.admin.modules.contacts.mass_actions.EditContactsAction[source]
Bases:
PicotableRedirectMassAction
- label = 'Edit Contacts'
- identifier = 'mass_action_edit_contact'
- redirect_url = '/sa/contacts/mass-edit/'
- class shuup.admin.modules.contacts.mass_actions.EditContactGroupsAction[source]
Bases:
PicotableRedirectMassAction
- label = 'Set Contact Groups'
- identifier = 'mass_action_edit_contact_group'
- redirect_url = '/sa/contacts/mass-edit-group/'
- class shuup.admin.modules.contacts.mass_actions.ExportContactsCSVAction[source]
Bases:
BaseExportCSVMassAction
- identifier = 'mass_action_export_contact_csv'
- view_class
alias of
ContactListView
- filename = 'contacts.csv'
shuup.admin.modules.contacts.sections module
- class shuup.admin.modules.contacts.sections.BasicInfoContactSection[source]
Bases:
Section
- classmethod visible_for_object(contact, 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(contact, 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
- class shuup.admin.modules.contacts.sections.AddressesContactSection[source]
Bases:
Section
- classmethod visible_for_object(contact, 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(contact, 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
- class shuup.admin.modules.contacts.sections.OrdersContactSection[source]
Bases:
Section
- classmethod visible_for_object(contact, 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(contact, 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
- class shuup.admin.modules.contacts.sections.MembersContactSection[source]
Bases:
Section
- classmethod visible_for_object(contact, 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(contact, 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.contacts.utils module
Module contents
- class shuup.admin.modules.contacts.ContactModule[source]
Bases:
AdminModule
- name = 'Contacts'
- Return type:
- 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:
object (django.db.models.Model) – A object instance (or object class).
kind (str) – URL kind. Currently “detail”, “list” or “new”.
shop (shuup.core.models.Shop|None) – The shop that owns the resource.
- Returns:
The reversed URL or none.
- Return type:
str|None