mirror of
https://github.com/django/django.git
synced 2025-07-24 05:36:15 +00:00
Fixed #17046 -- Added a check if the username passed to User.objects.create_user is empty or not. Thanks, kwadrat.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17628 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
40b248acc7
commit
fcaf8eae14
3 changed files with 10 additions and 1 deletions
|
@ -280,7 +280,9 @@ Manager functions
|
|||
.. method:: models.UserManager.create_user(username, email=None, password=None)
|
||||
|
||||
.. versionchanged:: 1.4
|
||||
The ``email`` parameter was made optional.
|
||||
The ``email`` parameter was made optional. The username
|
||||
parameter is now checked for emptiness and raises a
|
||||
:exc:`ValueError` in case of a negative result.
|
||||
|
||||
Creates, saves and returns a :class:`~django.contrib.auth.models.User`.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue