Ticket #19588: 19588.diff

File 19588.diff, 2.1 KB (added by Tim Graham, 12 years ago)
  • docs/ref/contrib/auth.txt

    diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt
    index e35a5b3..66fd0c8 100644
    a b Manager methods  
    218218.. class:: models.UserManager
    219219
    220220    The :class:`~django.contrib.auth.models.User` model has a custom manager
    221     that has the following helper methods:
     221    that has the following helper methods (in addition to the methods provided
     222    by :class:`~django.contrib.auth.models.BaseUserManager`:
    222223
    223     .. method:: create_user(username, email=None, password=None)
     224    .. method:: create_user(username, email=None, password=None, **extra_fields)
    224225
    225226        Creates, saves and returns a :class:`~django.contrib.auth.models.User`.
    226227
    Manager methods  
    235236        :meth:`~django.contrib.auth.models.User.set_unusable_password()` will
    236237        be called.
    237238
    238         See :ref:`Creating users <topics-auth-creating-users>` for example usage.
     239        The ``extra_fields`` keyword arguments are passed through to the
     240        :class:`~django.contrib.auth.models.User`'s ``__init__`` method to
     241        allow setting arbitrary fields on a :ref:`custom User model
     242        <auth-custom-user>`.
    239243
    240     .. method:: make_random_password(length=10, allowed_chars='abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789')
     244        See :ref:`Creating users <topics-auth-creating-users>` for example usage.
    241245
    242         Returns a random password with the given length and given string of
    243         allowed characters. (Note that the default value of ``allowed_chars``
    244         doesn't contain letters that can cause user confusion, including:
     246    .. method:: create_superuser(self, username, email, password, **extra_fields)
    245247
    246         * ``i``, ``l``, ``I``, and ``1`` (lowercase letter i, lowercase
    247           letter L, uppercase letter i, and the number one)
    248         * ``o``, ``O``, and ``0`` (uppercase letter o, lowercase letter o,
    249           and zero)
     248        Same as :meth:`create_user`, but sets :attr:`~models.User.is_staff` and
     249        :attr:`~models.User.is_superuser` to ``True``.
    250250
    251251
    252252Anonymous users
Back to Top