All code handling email addresses has been update to use a new function
normalise_email, to have one consistent way of handling email addresses.
This function lowercases the domain part of an email address if it can
find an @, so it works on partial addresses as well.
* Emailbackend: Updated to use REQUIRED_FIELDS
* Demo and sandbox site now use compat.AUTH_USER_MODEL as well
* Added example custom user that gets tested for Django >= 1.5
Adjust email auth backend to allow emails to contain capitals
Before it was lower-casing everything first which prevented users being
able to login if their email address contained capitals. We now only
lower case the host part as this is case-insensitive.
Fixes #505
Uses a class-based reimplementation of Django's existing function-based login view. The view also handles registration at the same URL endpoint. It depends on the submit button having a name of "login" or "registration" to determine which form was POSTed.
Auth is done using email addresses rather than username (which is a randomly generated string). The registration process enforces uniqueness, but this won't be enforced anywhere else, so we need to be careful not to duplicate email addresses in the admin or something.