Templates

The app does not ship with any templates. There are some templates in the sample project available in the source distribution, but you should write your own but they are extremely simple and for demonstration purposes only.

These are the templates you should create at the very least:

registration/signup_form.html

Holds the registration form. It is displayed by a view which inherits from FormView. It has the following context:

  • form: an instance of the configured SIGNUP_FORM_CLASS or an instance of django.contrib.auth.forms.UserCreationForm
registration/signup_complete.html

A simple page indicating that the account has been created and an email has been sent to finish the sign up process. It has no special context.

registration/activation_failed.html

Should display a message indicating that the activation failed. It has the following context:

  • activation_key: The key used to activate the account. It’s part of the URL
registration/activation_complete.html

Should display a message saying that the account was successfully activated. It has no special context.

registration/activation_email.txt

Contains the email subject and body, in text and optional html format. This template has a special “syntax” in order to include the subject and body in the same file. A sample file is shown below. Empty lines at the begin and end of each block are stripped away.

-- title=subject

This is the subject of the email,

multiple lines will be joined

-- title=txt
This is the text part of the email

-- title=html
This is the html part of the email, it's optional

This template has the following context:

  • url: The full url to be used to activate the account. Includes the domain and path
  • activation_days: How many days the user has to activate his account

Previous topic

Setup

Next topic

Management commands

This Page