A model to temporarily store an email adress change request.
EmailField (Required)
The new email address that still needs to be confirmed.
| Parameters: |
|
|---|
DateTimeField (Automatically set when created)
The date and time the email address change was requested.
| Parameters: |
|
|---|
OneToOneField(‘User‘) (Required)
The user that has requested the email address change.
| Parameters: |
|
|---|
ForeignKey(‘Site‘)
| Parameters: |
|
|---|
get_latest_by = date
ordering = []
verbose_name = email address change request
verbose_name_plural = email address change requests
Checks if
| Parameters: | signature (str) – The signature to check, as generated by make_signature(). |
|---|---|
| Returns: | True if the check was successfully completed, False otherwise. |
| Return type: | bool |
Returns the expiration date of an EmailChange object by adding a given amount of seconds to it.
| Parameters: | seconds (int) – The number of seconds to calculate a datetime.timedelta object. Defaults to EMAIL_CHANGE_TIMEOUT. |
|---|---|
| Returns: | A datetime object representing the expiration date. |
| Return type: | datetime |
Checks whether this request has already expired.
| Parameters: | seconds (int) – The number of seconds to calculate a datetime.timedelta object. Defaults to EMAIL_CHANGE_TIMEOUT. |
|---|---|
| Returns: | True if the request has already expired, False otherwise. |
| Return type: | bool |
Generates a signature to use in one-time secret URL’s to confirm the email address change request.
| Returns: | A signature. |
|---|---|
| Return type: | str |
An instance method to send a confirmation mail to the new email address.
The generation of a confirmation email will use three templates that can be set in each project’s settings:
These templates will receive the following context variables:
| Parameters: | request (obj) – The request object. |
|---|
Checks if the signature has been tampered with.
| Parameters: | signature (str) – The signature to check, as generated by make_signature(). |
|---|---|
| Returns: | True if the signature has not been tampered with, False otherwise. :rtype: bool |