Code

Ticket #19588: 19588.diff

File 19588.diff, 2.1 KB (added by timo, 18 months ago)
Line 
1diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt
2index e35a5b3..66fd0c8 100644
3--- a/docs/ref/contrib/auth.txt
4+++ b/docs/ref/contrib/auth.txt
5@@ -218,9 +218,10 @@ Manager methods
6 .. class:: models.UserManager
7 
8     The :class:`~django.contrib.auth.models.User` model has a custom manager
9-    that has the following helper methods:
10+    that has the following helper methods (in addition to the methods provided
11+    by :class:`~django.contrib.auth.models.BaseUserManager`:
12 
13-    .. method:: create_user(username, email=None, password=None)
14+    .. method:: create_user(username, email=None, password=None, **extra_fields)
15 
16         Creates, saves and returns a :class:`~django.contrib.auth.models.User`.
17 
18@@ -235,18 +236,17 @@ Manager methods
19         :meth:`~django.contrib.auth.models.User.set_unusable_password()` will
20         be called.
21 
22-        See :ref:`Creating users <topics-auth-creating-users>` for example usage.
23+        The ``extra_fields`` keyword arguments are passed through to the
24+        :class:`~django.contrib.auth.models.User`'s ``__init__`` method to
25+        allow setting arbitrary fields on a :ref:`custom User model
26+        <auth-custom-user>`.
27 
28-    .. method:: make_random_password(length=10, allowed_chars='abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789')
29+        See :ref:`Creating users <topics-auth-creating-users>` for example usage.
30 
31-        Returns a random password with the given length and given string of
32-        allowed characters. (Note that the default value of ``allowed_chars``
33-        doesn't contain letters that can cause user confusion, including:
34+    .. method:: create_superuser(self, username, email, password, **extra_fields)
35 
36-        * ``i``, ``l``, ``I``, and ``1`` (lowercase letter i, lowercase
37-          letter L, uppercase letter i, and the number one)
38-        * ``o``, ``O``, and ``0`` (uppercase letter o, lowercase letter o,
39-          and zero)
40+        Same as :meth:`create_user`, but sets :attr:`~models.User.is_staff` and
41+        :attr:`~models.User.is_superuser` to ``True``.
42 
43 
44 Anonymous users