diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2013-02-15 09:00:55 +0800 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2013-02-15 09:02:14 +0800 |
| commit | bc6746ac303ab625f2bc6fc878bd63661c784a59 (patch) | |
| tree | 1c49723ae98e045e33b6a4bca763d32772ee98f9 /docs | |
| parent | 1c086df50e76f1fd84e0d90bfb1d0b13468ba13b (diff) | |
[1.5.x] Fixed #19822 -- Added validation for uniqueness on USERNAME_FIELD on custom User models.
Thanks to Claude Peroz for the draft patch.
(cherry picked from commit f5e4a699ca0f58818acbdf9081164060cee910fa)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/auth/customizing.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index e61780ed79..9c36bf26e5 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -486,7 +486,10 @@ password resets. You must then provide some key implementation details: A string describing the name of the field on the User model that is used as the unique identifier. This will usually be a username of some kind, but it can also be an email address, or any other unique - identifier. In the following example, the field `identifier` is used + identifier. The field *must* be unique (i.e., have ``unique=True`` + set in it's definition). + + In the following example, the field `identifier` is used as the identifying field:: class MyUser(AbstractBaseUser): |
