registration.backends package¶
Submodules¶
registration.backends.base module¶
-
class
registration.backends.base.RegistrationBackendBase[source]¶ Bases:
objectBase 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
Userfor success,Nonefor 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_keyandpasswordThis method should be called after the account registration has accepted, otherwise it should not be success.
Returning is
user,passwordandis_generatedfor success,Nonefor fail.If
passwordis not given, this method will generate password andis_generatedshould beTruein this case.
-
get_site(request)[source]¶ get current
django.contrib.Siteinstancereturn
django.contrib.RequestSiteinstance when theSiteis 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.ImproperlyConfiguredis raised.
-
class
registration.backends.RegistrationBackendBase[source]¶ Bases:
objectBase 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
Userfor success,Nonefor 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_keyandpasswordThis method should be called after the account registration has accepted, otherwise it should not be success.
Returning is
user,passwordandis_generatedfor success,Nonefor fail.If
passwordis not given, this method will generate password andis_generatedshould beTruein this case.
-
get_site(request)[source]¶ get current
django.contrib.Siteinstancereturn
django.contrib.RequestSiteinstance when theSiteis not installed.
-