shuup.front.apps.registration package¶
Submodules¶
shuup.front.apps.registration.forms module¶
-
class
shuup.front.apps.registration.forms.
UserCreationForm
(*args, **kwargs)[source]¶ Bases:
django.contrib.auth.forms.UserCreationForm
-
base_fields
= OrderedDict([('username', <django.contrib.auth.forms.UsernameField object>), ('password1', <django.forms.fields.CharField object>), ('password2', <django.forms.fields.CharField object>)])¶
-
declared_fields
= OrderedDict([('password1', <django.forms.fields.CharField object>), ('password2', <django.forms.fields.CharField object>)])¶
-
media
¶
-
-
class
shuup.front.apps.registration.forms.
CompanyForm
(*args, **kwargs)[source]¶ Bases:
shuup.front.utils.companies.TaxNumberCleanMixin
,django.forms.models.ModelForm
-
class
Meta
[source]¶ Bases:
object
-
model
¶ alias of
CompanyContact
-
fields
= ['name', 'name_ext', 'tax_number', 'email', 'phone', 'www']¶
-
help_texts
= {'name': 'Name of the company', 'email': None, 'phone': None}¶
-
-
base_fields
= OrderedDict([('name', <django.forms.fields.CharField object>), ('name_ext', <django.forms.fields.CharField object>), ('tax_number', <django.forms.fields.CharField object>), ('email', <django.forms.fields.EmailField object>), ('phone', <django.forms.fields.CharField object>), ('www', <django.forms.fields.URLField object>)])¶
-
declared_fields
= OrderedDict()¶
-
media
¶
-
class
-
class
shuup.front.apps.registration.forms.
ContactPersonForm
(**kwargs)[source]¶ Bases:
django.forms.models.ModelForm
-
class
Meta
[source]¶ Bases:
object
-
model
¶ alias of
PersonContact
-
fields
= ['first_name', 'last_name', 'email', 'phone']¶
-
-
base_fields
= OrderedDict([('first_name', <django.forms.fields.CharField object>), ('last_name', <django.forms.fields.CharField object>), ('email', <django.forms.fields.EmailField object>), ('phone', <django.forms.fields.CharField object>)])¶
-
declared_fields
= OrderedDict()¶
-
media
¶
-
class
-
class
shuup.front.apps.registration.forms.
PersonRegistrationForm
(*args, **kwargs)[source]¶ Bases:
registration.forms.RegistrationForm
-
base_fields
= OrderedDict([('username', <django.forms.fields.CharField object>), ('email', <django.forms.fields.EmailField object>), ('password1', <django.forms.fields.CharField object>), ('password2', <django.forms.fields.CharField object>)])¶
-
declared_fields
= OrderedDict([('password1', <django.forms.fields.CharField object>), ('password2', <django.forms.fields.CharField object>), ('email', <django.forms.fields.EmailField object>)])¶
-
media
¶
-
shuup.front.apps.registration.notify_events module¶
-
class
shuup.front.apps.registration.notify_events.
RegistrationReceived
(**variable_values)[source]¶ Bases:
shuup.notify.base.Event
-
identifier
= 'registration_received'¶
-
name
= 'Registration Received'¶
-
bindings
= {}¶
-
variables
= {'customer': <shuup.notify.base.Variable object>, 'customer_email': <shuup.notify.base.Variable object>, 'activation_url': <shuup.notify.base.Variable object>, 'user_is_active': <shuup.notify.base.Variable object>}¶
-
-
class
shuup.front.apps.registration.notify_events.
AccountReactivation
(**variable_values)[source]¶ Bases:
shuup.front.apps.registration.notify_events.RegistrationReceived
-
identifier
= 'account_reactivation'¶
-
name
= 'Account Reactivation'¶
-
bindings
= {}¶
-
variables
= {'customer': <shuup.notify.base.Variable object>, 'customer_email': <shuup.notify.base.Variable object>, 'activation_url': <shuup.notify.base.Variable object>, 'user_is_active': <shuup.notify.base.Variable object>}¶
-
-
class
shuup.front.apps.registration.notify_events.
CompanyRegistrationReceived
(**variable_values)[source]¶ Bases:
shuup.front.apps.registration.notify_events.RegistrationReceived
-
identifier
= 'company_registration_received'¶
-
name
= 'Company Registration Received'¶
-
bindings
= {}¶
-
variables
= {'customer': <shuup.notify.base.Variable object>, 'customer_email': <shuup.notify.base.Variable object>, 'activation_url': <shuup.notify.base.Variable object>, 'user_is_active': <shuup.notify.base.Variable object>}¶
-
-
class
shuup.front.apps.registration.notify_events.
CompanyApproved
(**variable_values)[source]¶ Bases:
shuup.front.apps.registration.notify_events.RegistrationReceived
-
identifier
= 'company_approved_by_admin'¶
-
name
= 'Company Approved'¶
-
bindings
= {}¶
-
variables
= {'customer': <shuup.notify.base.Variable object>, 'customer_email': <shuup.notify.base.Variable object>, 'activation_url': <shuup.notify.base.Variable object>, 'user_is_active': <shuup.notify.base.Variable object>}¶
-
-
class
shuup.front.apps.registration.notify_events.
AccountActivation
(**variable_values)[source]¶ Bases:
shuup.front.apps.registration.notify_events.RegistrationReceived
-
identifier
= 'account_activation'¶
-
name
= 'Account Activation'¶
-
bindings
= {}¶
-
variables
= {'customer': <shuup.notify.base.Variable object>, 'customer_email': <shuup.notify.base.Variable object>, 'activation_url': <shuup.notify.base.Variable object>, 'user_is_active': <shuup.notify.base.Variable object>}¶
-
-
shuup.front.apps.registration.notify_events.
send_activation_notification
(user, request, **kwargs)[source]¶
-
shuup.front.apps.registration.notify_events.
send_user_registered_notification
(user, request, **kwargs)[source]¶
shuup.front.apps.registration.settings module¶
-
shuup.front.apps.registration.settings.
SHUUP_REGISTRATION_REQUIRES_ACTIVATION
= True¶ Require email-based activation for users?
This corresponds to using the
default
orsimple
django-registration
backends.
-
shuup.front.apps.registration.settings.
REGISTRATION_FORM
= 'shuup.front.apps.registration.forms.PersonRegistrationForm'¶ The Shuup default registration form for person This overrides the setting from
registration
lib to allow custom logic like receiving the request from kwargs
shuup.front.apps.registration.signals module¶
shuup.front.apps.registration.urls module¶
shuup.front.apps.registration.views module¶
-
class
shuup.front.apps.registration.views.
RegistrationViewMixin
[source]¶ Bases:
object
-
template_name
= 'shuup/registration/register.jinja'¶
-
-
class
shuup.front.apps.registration.views.
RegistrationNoActivationView
(**kwargs)[source]¶ Bases:
shuup.front.apps.registration.views.RegistrationViewMixin
,registration.backends.simple.views.RegistrationView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
class
shuup.front.apps.registration.views.
RegistrationWithActivationView
(**kwargs)[source]¶ Bases:
shuup.front.apps.registration.views.RegistrationViewMixin
,registration.backends.default.views.RegistrationView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
SEND_ACTIVATION_EMAIL
= False¶
-
-
class
shuup.front.apps.registration.views.
RegistrationView
(**kwargs)[source]¶ Bases:
django.views.generic.base.View
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
class
shuup.front.apps.registration.views.
CompanyRegistrationView
(**kwargs)[source]¶ Bases:
shuup.front.apps.registration.views.RegistrationViewMixin
,registration.backends.default.views.RegistrationView
Constructor. Called in the URLconf; can contain helpful extra keyword arguments, and other things.
-
template_name
= 'shuup/registration/company_register.jinja'¶
-
form_class
¶ alias of
CompanyRegistrationForm
-
SEND_ACTIVATION_EMAIL
= False¶
-
Module contents¶
Shuup Registration Add-on¶
The shuup.front.apps.registration add-on provides simple user registration and email token based activation.
It is based on the django-registration-redux package.
Installation¶
Add registration
and shuup.front.apps.registration
into your INSTALLED_APPS
(and run migrations, of course).
The application registers its URLs via the front_urls
provides
mechanism.
URL names¶
shuup:registration_register
– the entry point for registration.
-
class
shuup.front.apps.registration.
RegistrationAppConfig
(*args, **kwargs)[source]¶ Bases:
shuup.apps.AppConfig
-
name
= 'shuup.front.apps.registration'¶
-
verbose_name
= 'Shuup Frontend - User Registration'¶
-
label
= 'shuup_front.registration'¶
-
required_installed_apps
= {'registration': 'django-registration-redux is required for user registration and activation'}¶
-
provides
= {'front_urls': ['shuup.front.apps.registration.urls:urlpatterns'], 'notify_event': ['shuup.front.apps.registration.notify_events:RegistrationReceived', 'shuup.front.apps.registration.notify_events:AccountReactivation', 'shuup.front.apps.registration.notify_events:CompanyRegistrationReceived', 'shuup.front.apps.registration.notify_events:CompanyApproved', 'shuup.front.apps.registration.notify_events:AccountActivation'], 'notify_script_template': ['shuup.front.apps.registration.notify_events:RegistrationReceivedEmailScriptTemplate', 'shuup.front.apps.registration.notify_events:AccountReactivationEmailScriptTemplate', 'shuup.front.apps.registration.notify_events:CompanyRegistrationReceivedEmailScriptTemplate', 'shuup.front.apps.registration.notify_events:CompanyActivatedEmailScriptTemplate', 'shuup.front.apps.registration.notify_events:AccountActivationEmailScriptTemplate']}¶
-