shoop.admin.modules.contacts.views package¶
Submodules¶
shoop.admin.modules.contacts.views.detail module¶
-
class
shoop.admin.modules.contacts.views.detail.
ContactDetailToolbar
(contact)[source]¶ Bases:
shoop.admin.toolbar.Toolbar
-
class
shoop.admin.modules.contacts.views.detail.
ContactDetailView
(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Contact
-
template_name
= 'shoop/admin/contacts/detail.jinja'¶
-
context_object_name
= 'contact'¶
-
shoop.admin.modules.contacts.views.edit module¶
-
class
shoop.admin.modules.contacts.views.edit.
ContactBaseForm
(bind_user=None, *args, **kwargs)[source]¶ Bases:
django.forms.models.BaseModelForm
This form is notoriously confusing in that it works in several different modes depending on what the instance being passed in is.
If the instance is an unsaved object, the form will show fields for the common superclass Contact as well as a type selection field. When saving the object, a _new_ instance is created, as its class will have been specialized into the actual concrete polymorphic type. (I said this is confusing.)
If the instance is a saved object, its type is checked and only the related fields are shown and none of that specialization stuff occurs.
-
FIELDS_BY_MODEL_NAME
= {'CompanyContact': ('tax_number',), 'Contact': ('is_active', 'language', 'marketing_permission', 'phone', 'www', 'timezone', 'prefix', 'name', 'suffix', 'name_ext', 'email', 'tax_group'), 'PersonContact': ('gender', 'birth_date')}¶
-
-
class
shoop.admin.modules.contacts.views.edit.
ContactBaseFormPart
(request, object=None)[source]¶ Bases:
shoop.admin.form_part.FormPart
-
priority
= -1000¶
-
-
class
shoop.admin.modules.contacts.views.edit.
AddressForm
(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, instance=None)[source]¶ Bases:
django.forms.models.ModelForm
-
class
Meta
[source]¶ Bases:
object
-
model
¶ alias of
MutableAddress
-
fields
= ('prefix', 'name', 'suffix', 'name_ext', 'phone', 'email', 'street', 'street2', 'street3', 'postal_code', 'city', 'region_code', 'region', 'country')¶
-
-
AddressForm.
base_fields
= OrderedDict([('prefix', <django.forms.fields.CharField object at 0x7f15c607c438>), ('name', <django.forms.fields.CharField object at 0x7f15c607c9e8>), ('suffix', <django.forms.fields.CharField object at 0x7f15c6146550>), ('name_ext', <django.forms.fields.CharField object at 0x7f15c6086438>), ('phone', <django.forms.fields.CharField object at 0x7f15c6086ef0>), ('email', <django.forms.fields.EmailField object at 0x7f15c6086550>), ('street', <django.forms.fields.CharField object at 0x7f15c6086f28>), ('street2', <django.forms.fields.CharField object at 0x7f15c6092048>), ('street3', <django.forms.fields.CharField object at 0x7f15c6008278>), ('postal_code', <django.forms.fields.CharField object at 0x7f15c60085f8>), ('city', <django.forms.fields.CharField object at 0x7f15c60082b0>), ('region_code', <django.forms.fields.CharField object at 0x7f15c6008198>), ('region', <django.forms.fields.CharField object at 0x7f15c5fc2400>), ('country', <django_countries.fields.LazyTypedChoiceField object at 0x7f15c5fc25c0>)])¶
-
AddressForm.
declared_fields
= OrderedDict()¶
-
AddressForm.
media
¶
-
class
-
class
shoop.admin.modules.contacts.views.edit.
ContactAddressesFormPart
(request, object=None)[source]¶ Bases:
shoop.admin.form_part.FormPart
-
priority
= -900¶
-
-
class
shoop.admin.modules.contacts.views.edit.
ContactEditView
(**kwargs)[source]¶ Bases:
shoop.admin.form_part.SaveFormPartsMixin
,shoop.admin.form_part.FormPartsViewMixin
,shoop.admin.utils.views.CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Contact
-
template_name
= 'shoop/admin/contacts/edit.jinja'¶
-
context_object_name
= 'contact'¶
-
base_form_part_classes
= [<class 'shoop.admin.modules.contacts.views.edit.ContactBaseFormPart'>, <class 'shoop.admin.modules.contacts.views.edit.ContactAddressesFormPart'>]¶
-
form_part_class_provide_key
= 'admin_contact_form_part'¶
-
shoop.admin.modules.contacts.views.list module¶
-
class
shoop.admin.modules.contacts.views.list.
ContactListView
(**kwargs)[source]¶ Bases:
shoop.admin.utils.views.PicotableListView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
model
¶ alias of
Contact
-
columns
= [<shoop.admin.utils.picotable.Column object at 0x7f15c6146a20>, <shoop.admin.utils.picotable.Column object at 0x7f15c5fc24e0>, <shoop.admin.utils.picotable.Column object at 0x7f15c5fc2550>, <shoop.admin.utils.picotable.Column object at 0x7f15c5fc2be0>, <shoop.admin.utils.picotable.Column object at 0x7f15c5fc2f98>, <shoop.admin.utils.picotable.Column object at 0x7f15c5fc2d30>]¶
-
shoop.admin.modules.contacts.views.reset module¶
-
class
shoop.admin.modules.contacts.views.reset.
ContactResetPasswordView
(**kwargs)[source]¶ Bases:
shoop.admin.modules.users.views.password.UserResetPasswordView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
Module contents¶
-
class
shoop.admin.modules.contacts.views.
ContactListView
(**kwargs)[source]¶ Bases:
shoop.admin.utils.views.PicotableListView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
columns
= [<shoop.admin.utils.picotable.Column object at 0x7f15c6146a20>, <shoop.admin.utils.picotable.Column object at 0x7f15c5fc24e0>, <shoop.admin.utils.picotable.Column object at 0x7f15c5fc2550>, <shoop.admin.utils.picotable.Column object at 0x7f15c5fc2be0>, <shoop.admin.utils.picotable.Column object at 0x7f15c5fc2f98>, <shoop.admin.utils.picotable.Column object at 0x7f15c5fc2d30>]¶
-
model
¶ alias of
Contact
-
-
class
shoop.admin.modules.contacts.views.
ContactDetailView
(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
context_object_name
= 'contact'¶
-
model
¶ alias of
Contact
-
template_name
= 'shoop/admin/contacts/detail.jinja'¶
-
-
class
shoop.admin.modules.contacts.views.
ContactResetPasswordView
(**kwargs)[source]¶ Bases:
shoop.admin.modules.users.views.password.UserResetPasswordView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
class
shoop.admin.modules.contacts.views.
ContactEditView
(**kwargs)[source]¶ Bases:
shoop.admin.form_part.SaveFormPartsMixin
,shoop.admin.form_part.FormPartsViewMixin
,shoop.admin.utils.views.CreateOrUpdateView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
base_form_part_classes
= [<class 'shoop.admin.modules.contacts.views.edit.ContactBaseFormPart'>, <class 'shoop.admin.modules.contacts.views.edit.ContactAddressesFormPart'>]¶
-
context_object_name
= 'contact'¶
-
form_part_class_provide_key
= 'admin_contact_form_part'¶
-
model
¶ alias of
Contact
-
template_name
= 'shoop/admin/contacts/edit.jinja'¶
-