Kaydet (Commit) 24ba5f7f authored tarafından Tim Graham's avatar Tim Graham

[1.7.x] Fixed docs/ref/contrib/auth.txt so that sphinx links work properly.

Backport of 5359188b from master
üst 43d7566c
......@@ -307,18 +307,20 @@ Fields
:class:`~django.contrib.auth.models.Permission` objects have the following
fields:
.. attribute:: name
.. class:: models.Permission
.. attribute:: name
Required. 50 characters or fewer. Example: ``'Can vote'``.
Required. 50 characters or fewer. Example: ``'Can vote'``.
.. attribute:: content_type
.. attribute:: content_type
Required. A reference to the ``django_content_type`` database table, which
contains a record for each installed Django model.
Required. A reference to the ``django_content_type`` database table,
which contains a record for each installed model.
.. attribute:: codename
.. attribute:: codename
Required. 100 characters or fewer. Example: ``'can_vote'``.
Required. 100 characters or fewer. Example: ``'can_vote'``.
Methods
-------
......@@ -336,19 +338,21 @@ Fields
:class:`~django.contrib.auth.models.Group` objects have the following fields:
.. attribute:: name
.. class:: models.Group
.. attribute:: name
Required. 80 characters or fewer. Any characters are permitted. Example:
``'Awesome Users'``.
Required. 80 characters or fewer. Any characters are permitted. Example:
``'Awesome Users'``.
.. attribute:: permissions
.. attribute:: permissions
Many-to-many field to :class:`~django.contrib.auth.models.Permission`::
Many-to-many field to :class:`~django.contrib.auth.models.Permission`::
group.permissions = [permission_list]
group.permissions.add(permission, permission, ...)
group.permissions.remove(permission, permission, ...)
group.permissions.clear()
group.permissions = [permission_list]
group.permissions.add(permission, permission, ...)
group.permissions.remove(permission, permission, ...)
group.permissions.clear()
.. _topics-auth-signals:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment