Exception classes¶
django-registration provides two base exception classes to signal errors which occur during the signup or activation processes.
-
exception
django_registration.exceptions.
RegistrationError
(message, code, params)¶ Base exception class for all exceptions raised in django-registration. No code in django-registration will raise this exception directly; it serves solely to provide a distinguishing parent class for other errors. Arguments passed when the exception is raised will be stored and exposed as attributes of the same names on the exception object:
- Parameters
message (str) – A human-readable error message.
code (str) – A short but unique identifier used by subclasses to distinguish different error conditions.
params (dict) – Arbitrary key-value data to associate with the error.
-
exception
django_registration.exceptions.
ActivationError
(message, code, params)¶ Exception class to indicate errors during account activation. Subclass of
RegistrationError
and inherits its attributes.