registration.backends package¶
Submodules¶
registration.backends.base module¶
-
class
registration.backends.base.
RegistrationBackendBase
[source]¶ Bases:
object
Base class of registration backend
-
get_site -- return current site
-
register -- register a new user
-
accept -- accept a registration
-
reject -- reject a registration
-
activate -- activate a user
-
get_supplement_class -- get registration supplement class
-
get_activation_form_class -- get activation form class
-
get_registration_form_class -- get registration form class
-
get_supplement_form_class -- get registration supplement form class
-
get_activation_complete_url -- get activation complete redirect url
-
get_registration_complete_url -- get registration complete redirect url
-
get_registration_closed_url -- get registration closed redirect url
-
registration_allowed -- whether registration is allowed now
-
accept
(profile, request, send_email=True, message=None, force=False)[source]¶ accept account registration with given
profile
(an instance ofRegistrationProfile
)Returning should be a instance of accepted
User
for success,None
for fail.This method SHOULD work even after the account registration has rejected.
-
activate
(activation_key, request, password=None, send_email=True, message=None, no_profile_delete=False)[source]¶ activate account with
activation_key
andpassword
This method should be called after the account registration has accepted, otherwise it should not be success.
Returning is
user
,password
andis_generated
for success,None
for fail.If
password
is not given, this method will generate password andis_generated
should beTrue
in this case.
-
get_site
(request)[source]¶ get current
django.contrib.Site
instancereturn
django.contrib.RequestSite
instance when theSite
is not installed.
-
Module contents¶
-
registration.backends.
get_backend
(path=None)[source]¶ Return an instance of a registration backend, given the dotted Python import path (as a string) to the backend class.
If the backend cannot be located (e.g., because no such module exists, or because the module does not contain a class of the appropriate name),
django.core.exceptions.ImproperlyConfigured
is raised.
-
class
registration.backends.
RegistrationBackendBase
[source]¶ Bases:
object
Base class of registration backend
-
get_site -- return current site
-
register -- register a new user
-
accept -- accept a registration
-
reject -- reject a registration
-
activate -- activate a user
-
get_supplement_class -- get registration supplement class
-
get_activation_form_class -- get activation form class
-
get_registration_form_class -- get registration form class
-
get_supplement_form_class -- get registration supplement form class
-
get_activation_complete_url -- get activation complete redirect url
-
get_registration_complete_url -- get registration complete redirect url
-
get_registration_closed_url -- get registration closed redirect url
-
registration_allowed -- whether registration is allowed now
-
accept
(profile, request, send_email=True, message=None, force=False)[source]¶ accept account registration with given
profile
(an instance ofRegistrationProfile
)Returning should be a instance of accepted
User
for success,None
for fail.This method SHOULD work even after the account registration has rejected.
-
activate
(activation_key, request, password=None, send_email=True, message=None, no_profile_delete=False)[source]¶ activate account with
activation_key
andpassword
This method should be called after the account registration has accepted, otherwise it should not be success.
Returning is
user
,password
andis_generated
for success,None
for fail.If
password
is not given, this method will generate password andis_generated
should beTrue
in this case.
-
get_site
(request)[source]¶ get current
django.contrib.Site
instancereturn
django.contrib.RequestSite
instance when theSite
is not installed.
-