shuup.admin.modules.contacts package
Subpackages
- shuup.admin.modules.contacts.views package
- Submodules
- shuup.admin.modules.contacts.views.detail module
ContactDetailToolbarContactDetailToolbar.__init__ContactDetailToolbar.build_renew_password_buttonContactDetailToolbar.build_new_user_buttonContactDetailToolbar.build_new_order_buttonContactDetailToolbar.build_deactivate_buttonContactDetailToolbar.build_user_buttonContactDetailToolbar.build_provides_buttonsContactDetailToolbar.build_login_as_buttonContactDetailToolbar.build
ContactDetailView
- shuup.admin.modules.contacts.views.edit module
ContactEditViewContactEditView.modelContactEditView.template_nameContactEditView.context_object_nameContactEditView.form_part_class_provide_keyContactEditView.get_objectContactEditView.get_contact_typeContactEditView.get_querysetContactEditView.get_form_part_classesContactEditView.form_validContactEditView.get_toolbarContactEditView.get_context_data
- shuup.admin.modules.contacts.views.list module
ContactTypeFilterContactListViewContactListView.modelContactListView.default_columnsContactListView.mass_actionsContactListView.toolbar_buttons_provider_keyContactListView.mass_actions_provider_keyContactListView.__init__ContactListView.get_groupsContactListView.get_shopsContactListView.get_toolbarContactListView.get_querysetContactListView.get_type_displayContactListView.get_groups_displayContactListView.get_shops_displayContactListView.get_object_abstract
- shuup.admin.modules.contacts.views.mass_edit module
- shuup.admin.modules.contacts.views.reset module
- Module contents
ContactListViewContactListView.__init__ContactListView.default_columnsContactListView.get_groupsContactListView.get_groups_displayContactListView.get_object_abstractContactListView.get_querysetContactListView.get_shopsContactListView.get_shops_displayContactListView.get_toolbarContactListView.get_type_displayContactListView.mass_actionsContactListView.mass_actions_provider_keyContactListView.modelContactListView.toolbar_buttons_provider_key
ContactDetailViewContactResetPasswordViewContactEditViewContactEditView.context_object_nameContactEditView.form_part_class_provide_keyContactEditView.form_validContactEditView.get_contact_typeContactEditView.get_context_dataContactEditView.get_form_part_classesContactEditView.get_objectContactEditView.get_querysetContactEditView.get_toolbarContactEditView.modelContactEditView.template_name
ContactGroupMassEditViewContactMassEditView
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