summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-02-11 13:39:35 -0500
committerTim Graham <timograham@gmail.com>2019-04-07 20:03:54 -0400
commitfb2b4253f93a85e21ee6bac4ecdac52929faeb2f (patch)
treead7d9fb940ed9d69a90b0af1896ec66ea05272f1 /docs/ref
parent0a8617a5b1cac7063f30e4d8ff4ea4c30748f7b8 (diff)
[2.1.x] Refs #27807 -- Removed docs for User.username_validator.
The new override functionality claimed in refs #21379 doesn't work. Forwardport of 714fdbaa7048c2321f6238d9421137c33d9af7cc from stable/1.10.x.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/auth.txt21
1 files changed, 1 insertions, 20 deletions
diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt
index b6a2d60f9d..721ddff27b 100644
--- a/docs/ref/contrib/auth.txt
+++ b/docs/ref/contrib/auth.txt
@@ -38,8 +38,7 @@ Fields
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`.
+ ASCII-only behavior on Python 2.
.. attribute:: first_name
@@ -141,24 +140,6 @@ Attributes
:attr:`~django.contrib.auth.models.User.is_authenticated` to this
attribute.
- .. attribute:: username_validator
-
- Points to a validator instance used to validate usernames. Defaults to
- :class:`validators.UnicodeUsernameValidator`.
-
- To change the default username validator, you can subclass the ``User``
- model and set this attribute to a different validator instance. For
- example, to use ASCII usernames::
-
- from django.contrib.auth.models import User
- from django.contrib.auth.validators import ASCIIUsernameValidator
-
- class CustomUser(User):
- username_validator = ASCIIUsernameValidator()
-
- class Meta:
- proxy = True # If no new field is added.
-
Methods
-------