shuup.front.apps.customer_information package
Submodules
shuup.front.apps.customer_information.dashboard_items module
- class shuup.front.apps.customer_information.dashboard_items.CustomerDashboardItem(request)[source]
Bases:
DashboardItem
- template_name = 'shuup/customer_information/customer_dashboard_item.jinja'
Title shown in dashboard menu and in dashboard
- title = 'Customer Information'
Sequence number of dashboard item
- icon = 'fa fa-user'
Text for dashboard
If your dashboard item shows single object,
Edit
is just fine but if you are listing objects,Show All
might be better.
- class shuup.front.apps.customer_information.dashboard_items.CompanyDashboardItem(request)[source]
Bases:
DashboardItem
- title = 'Company Information'
Sequence number of dashboard item
- description = 'Edit Company Information.'
- icon = 'fa fa-building'
Text for dashboard
If your dashboard item shows single object,
Edit
is just fine but if you are listing objects,Show All
might be better.
- show_on_dashboard()[source]
Defines if the item is shown in dashboard
- Returns:
True or False if item should be shown in dashboard
- Return type:
Defines if the item is shown in the main dashboard menu
- Returns:
True or False if item should be shown in menu
- Return type:
- class shuup.front.apps.customer_information.dashboard_items.AddressBookDashboardItem(request)[source]
Bases:
DashboardItem
- title = 'Address Book'
Sequence number of dashboard item
- description = 'Address Book'
- icon = 'fa fa-building'
Text for dashboard
If your dashboard item shows single object,
Edit
is just fine but if you are listing objects,Show All
might be better.
shuup.front.apps.customer_information.forms module
- class shuup.front.apps.customer_information.forms.PersonContactForm(*args, **kwargs)[source]
Bases:
ModelForm
- class Meta[source]
Bases:
object
- model
alias of
PersonContact
- fields = ('first_name', 'last_name', 'phone', 'email', 'gender', 'language', 'marketing_permission', 'timezone', '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 = {'email': <django.forms.fields.EmailField object>, 'first_name': <django.forms.fields.CharField object>, 'gender': <enumfields.forms.EnumChoiceField object>, 'language': <shuup.core.fields.LanguageFormField object>, 'last_name': <django.forms.fields.CharField object>, 'marketing_permission': <django.forms.fields.BooleanField object>, 'phone': <django.forms.fields.CharField object>, 'picture': <filer.fields.image.AdminImageFormField object>, 'timezone': <django.forms.fields.TypedChoiceField object>}
- declared_fields = {'language': <shuup.core.fields.LanguageFormField object>}
- property media
Return all media required to render the widgets on this form.
- class shuup.front.apps.customer_information.forms.CompanyContactForm(*args, **kwargs)[source]
Bases:
ModelForm
- class Meta[source]
Bases:
object
- model
alias of
CompanyContact
- fields = ('name', 'tax_number', 'phone', 'email', 'marketing_permission', 'picture')
- clean_tax_number()[source]
Clean Tax Number.
This is done because we want to prevent duplicates in the front-end.
- base_fields = {'email': <django.forms.fields.EmailField object>, 'marketing_permission': <django.forms.fields.BooleanField object>, 'name': <django.forms.fields.CharField object>, 'phone': <django.forms.fields.CharField object>, 'picture': <filer.fields.image.AdminImageFormField object>, 'tax_number': <django.forms.fields.CharField object>}
- declared_fields = {}
- property media
Return all media required to render the widgets on this form.
- class shuup.front.apps.customer_information.forms.SavedAddressForm(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 = {'role': <enumfields.forms.EnumChoiceField object>, 'status': <enumfields.forms.EnumChoiceField object>, 'title': <django.forms.fields.CharField object>}
- declared_fields = {'role': <enumfields.forms.EnumChoiceField object>, 'status': <enumfields.forms.EnumChoiceField object>, 'title': <django.forms.fields.CharField object>}
- property media
Return all media required to render the widgets on this form.
- class shuup.front.apps.customer_information.forms.CustomerInformationFormGroup(*args, **kwargs)[source]
Bases:
FormGroup
- address_forms = ['billing', 'shipping']
shuup.front.apps.customer_information.notify_events module
- class shuup.front.apps.customer_information.notify_events.CompanyAccountCreated(**variable_values)[source]
Bases:
Event
- identifier = 'company_account_created'
- bindings = {}
- name = 'Company Account Created'
- variables = {'contact': <shuup.notify.base.Variable object>, 'customer_email': <shuup.notify.base.Variable object>}
shuup.front.apps.customer_information.settings module
- shuup.front.apps.customer_information.settings.SHUUP_CUSTOMER_INFORMATION_EDIT_FORM = 'shuup.front.apps.customer_information.forms:CustomerInformationFormGroup'
The default customer information edit form
- shuup.front.apps.customer_information.settings.SHUUP_COMPANY_INFORMATION_EDIT_FORM = 'shuup.front.apps.customer_information.forms:CompanyInformationFormGroup'
The default company information edit form
- shuup.front.apps.customer_information.settings.SHUUP_ADDRESS_BOOK_EDIT_FORM = 'shuup.front.apps.customer_information.forms:AddressBookFormGroup'
The default address book edit form
- shuup.front.apps.customer_information.settings.SHUUP_CUSTOMER_INFORMATION_ALLOW_PICTURE_UPLOAD = False
Allow customers to upload profile picture
shuup.front.apps.customer_information.urls module
shuup.front.apps.customer_information.views module
- class shuup.front.apps.customer_information.views.CustomPasswordChangeView(**kwargs)[source]
Bases:
PasswordChangeView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'shuup/customer_information/change_password.jinja'
- success_url = '/customer/'
- form_class
alias of
PasswordChangeForm
- class shuup.front.apps.customer_information.views.CustomerEditView(**kwargs)[source]
Bases:
DashboardViewMixin
,FormView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'shuup/customer_information/edit_customer.jinja'
- class shuup.front.apps.customer_information.views.CompanyEditView(**kwargs)[source]
Bases:
DashboardViewMixin
,FormView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'shuup/customer_information/edit_company.jinja'
- class shuup.front.apps.customer_information.views.AddressBookView(**kwargs)[source]
Bases:
DashboardViewMixin
,TemplateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'shuup/customer_information/addressbook/index.jinja'
- class shuup.front.apps.customer_information.views.AddressBookEditView(**kwargs)[source]
Bases:
DashboardViewMixin
,FormView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
- template_name = 'shuup/customer_information/addressbook/edit.jinja'
- instance = None
Module contents
- class shuup.front.apps.customer_information.AppConfig(*args, **kwargs)[source]
Bases:
AppConfig
- name = 'shuup.front.apps.customer_information'
- verbose_name = 'Shuup Frontend - Customer Information Editing'
- label = 'shuup_front_customer_information'
- provides = {'customer_dashboard_items': ['shuup.front.apps.customer_information.dashboard_items:CustomerDashboardItem', 'shuup.front.apps.customer_information.dashboard_items:CompanyDashboardItem', 'shuup.front.apps.customer_information.dashboard_items:AddressBookDashboardItem'], 'front_urls': ['shuup.front.apps.customer_information.urls:urlpatterns'], 'notify_event': ['shuup.front.apps.customer_information.notify_events:CompanyAccountCreated']}
See /provides for details about the
provides
variable.