summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-07-27 08:42:01 -0400
committerTim Graham <timograham@gmail.com>2017-07-27 08:45:59 -0400
commit020c1c4cc8e334fbfa4c9d6d11e8953c9a5c9f3a (patch)
tree326891abc918478ec7974d0822e66c8201ff15c8
parent6e6aa77b3b0ea191300478f1c2569b1238d23648 (diff)
[1.11.x] Fixed #28415 -- Clarified what characters ASCII/UnicodeUsernameValidator accept.
Backport of 14172cf4426de6c867028f1c194011c0a26e662d from master
-rw-r--r--docs/ref/contrib/auth.txt20
-rw-r--r--docs/releases/1.10.txt8
2 files changed, 14 insertions, 14 deletions
diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt
index 71c6bd2ce1..b503b02455 100644
--- a/docs/ref/contrib/auth.txt
+++ b/docs/ref/contrib/auth.txt
@@ -34,12 +34,12 @@ Fields
.. admonition:: Usernames and Unicode
- Django originally accepted only ASCII letters in usernames.
- Although it wasn't a deliberate choice, Unicode characters have
- always been accepted when using Python 3. Django 1.10 officially
- added Unicode support in usernames, keeping the ASCII-only behavior
- on Python 2, with the option to customize the behavior using
- :attr:`.User.username_validator`.
+ Django originally accepted only ASCII letters and numbers in
+ usernames. Although it wasn't a deliberate choice, Unicode
+ characters have always been accepted when using Python 3. Django
+ 1.10 officially added Unicode support in usernames, keeping the
+ ASCII-only behavior on Python 2, with the option to customize the
+ behavior using :attr:`.User.username_validator`.
.. versionchanged:: 1.10
@@ -426,15 +426,15 @@ Validators
.. versionadded:: 1.10
- A field validator allowing only ASCII letters, in addition to ``@``, ``.``,
- ``+``, ``-``, and ``_``. The default validator for ``User.username`` on
- Python 2.
+ A field validator allowing only ASCII letters and numbers, in addition to
+ ``@``, ``.``, ``+``, ``-``, and ``_``. The default validator for
+ ``User.username`` on Python 2.
.. class:: validators.UnicodeUsernameValidator
.. versionadded:: 1.10
- A field validator allowing Unicode letters, in addition to ``@``, ``.``,
+ A field validator allowing Unicode characters, in addition to ``@``, ``.``,
``+``, ``-``, and ``_``. The default validator for ``User.username`` on
Python 3.
diff --git a/docs/releases/1.10.txt b/docs/releases/1.10.txt
index d25c7bc1ab..daf244e457 100644
--- a/docs/releases/1.10.txt
+++ b/docs/releases/1.10.txt
@@ -55,11 +55,11 @@ Official support for Unicode usernames
--------------------------------------
The :class:`~django.contrib.auth.models.User` model in ``django.contrib.auth``
-originally only accepted ASCII letters in usernames. Although it wasn't a
-deliberate choice, Unicode characters have always been accepted when using
-Python 3.
+originally only accepted ASCII letters and numbers in usernames. Although it
+wasn't a deliberate choice, Unicode characters have always been accepted when
+using Python 3.
-The username validator now explicitly accepts Unicode letters by
+The username validator now explicitly accepts Unicode characters by
default on Python 3 only. This default behavior can be overridden by changing
the :attr:`~django.contrib.auth.models.User.username_validator` attribute of
the ``User`` model, or to any proxy of that model, using either