Global verification

List of settings

These settings can be used to configure how verification should work (for things like registration, password reset, email change). You should add them as keys (with values) to your settings.REST_REGISTRATION dict.

‘VERIFICATION_FROM_EMAIL’

Default: None

No description available, please add it here!

‘VERIFICATION_REPLY_TO_EMAIL’

Default: None

No description available, please add it here!

‘VERIFICATION_EMAIL_HTML_TO_TEXT_CONVERTER’

Default: 'rest_registration.utils.html.convert_html_to_text_preserving_urls'

No description available, please add it here!

‘VERIFICATION_URL_BUILDER’

Default: 'rest_registration.utils.verification.build_default_verification_url'

The builder function receives the signer object and construct the url using signer.get_base_url() and signer.get_signed_data(). The default url builder will use the base url and append the signed data as HTTP GET query string. It is be solely up to the implementer of custom builder function to encode the signed values properly in the URL.

‘VERIFICATION_TEMPLATE_CONTEXT_BUILDER’

Default: 'rest_registration.utils.verification.build_default_template_context'

The builder function receives these parameters as positional arguments:

  • user - the user which is to be notified.
  • user_address - the user address, which can be the user e-mail, phone number, etc.
  • data - dictionary; in most cases it contains only one entry, which is the param_signer under 'param_signer' key. The implementer of the custom builder function should be aware that the contents of the dictionary are dynamic and write defensive code to account that.

and these parameters as keyword arguments:

  • notification_type - value of rest_registration.notifications.enums.NotificationType enum.
  • notification_method - value of rest_registration.notifications.enums.NotificationMethod enum. Currently there is only one choice which is NotificationMethod.EMAIL.

It is possible that in the future, additional keyword arguments may be added. Therefore the implementer of the custom builder function should take account of that, for instance by adding **kwargs in the signature of the function.