eventray/horus — pull request #46 by nandoflorestan (2014-09-27 23:43:53+00:00)
Title: Also operate without a "username" column.

Most sites these days will identify users by their email addresses, without a "username" field. For this most important use case, even having a "username" column in the database is an unnecessary burden.

With my alterations, horus can now provide 2 modes of operation:

- **email + username:** The user chooses a username when registering and later she can log in by providing either the username or the email address. Therefore, usernames may NOT contain the @ character. **This mode is the default.** It is expressed by the configuration setting ``horus.handle = usermail``
- **email only:** In this NEW mode, there is no ``username`` field and users only provide their email address. The documentation, added to the README, explains:

You enable this mode by:
- Making your User model subclass NoUsernameMixin instead of UsernameMixin;
- Adding this configuration setting: ``horus.handle = email``, which will make horus default to schemas that contain email fields instead of username fields.

If you make this change and want to keep your data you must deal with the existing (or missing) 'username' column yourself.