diff options
| author | Collin Anderson <cmawebsite@gmail.com> | 2015-12-29 14:52:48 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-01-08 18:06:44 -0500 |
| commit | 780bddf75b93784470a2e352ed44ee35a751d667 (patch) | |
| tree | e492c7184f3743dc45194491ba52bcf833b3c4fd /docs/ref | |
| parent | ea7542891a4e3638a695c58bd6f00658b7c85985 (diff) | |
Fixed #20846 -- Decreased User.username max_length to 150 characters.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/contrib/auth.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt index 6ca2581397..e4c31731d5 100644 --- a/docs/ref/contrib/auth.txt +++ b/docs/ref/contrib/auth.txt @@ -21,12 +21,19 @@ Fields .. attribute:: username - Required. 254 characters or fewer. Usernames may contain alphanumeric, + Required. 150 characters or fewer. Usernames may contain alphanumeric, ``_``, ``@``, ``+``, ``.`` and ``-`` characters. + The ``max_length`` should be sufficient for many use cases. If you need + a longer length, please use a :ref:`custom user model + <specifying-custom-user-model>`. If you use MySQL with the ``utf8mb4`` + encoding (recommended for proper Unicode support), specify at most + ``max_length=191`` because MySQL can only create unique indexes with + 191 characters in that case by default. + .. versionchanged:: 1.10 - The ``max_length`` increased from 30 to 254 characters. + The ``max_length`` increased from 30 to 150 characters. .. attribute:: first_name |
