mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #8936 -- Added a view permission and a read-only admin.
Co-authored-by: Petr Dlouhy <petr.dlouhy@email.cz> Co-authored-by: Olivier Dalang <olivier.dalang@gmail.com>
This commit is contained in:
parent
35b6a348de
commit
825f0beda8
32 changed files with 579 additions and 96 deletions
|
@ -313,7 +313,7 @@ Django quotes column and table names behind the scenes.
|
|||
.. attribute:: Options.permissions
|
||||
|
||||
Extra permissions to enter into the permissions table when creating this object.
|
||||
Add, delete and change permissions are automatically created for each
|
||||
Add, change, delete, and view permissions are automatically created for each
|
||||
model. This example specifies an extra permission, ``can_deliver_pizzas``::
|
||||
|
||||
permissions = (("can_deliver_pizzas", "Can deliver pizzas"),)
|
||||
|
@ -326,11 +326,15 @@ Django quotes column and table names behind the scenes.
|
|||
|
||||
.. attribute:: Options.default_permissions
|
||||
|
||||
Defaults to ``('add', 'change', 'delete')``. You may customize this list,
|
||||
for example, by setting this to an empty list if your app doesn't require
|
||||
any of the default permissions. It must be specified on the model before
|
||||
the model is created by :djadmin:`migrate` in order to prevent any omitted
|
||||
permissions from being created.
|
||||
Defaults to ``('add', 'change', 'delete', 'view')``. You may customize this
|
||||
list, for example, by setting this to an empty list if your app doesn't
|
||||
require any of the default permissions. It must be specified on the model
|
||||
before the model is created by :djadmin:`migrate` in order to prevent any
|
||||
omitted permissions from being created.
|
||||
|
||||
.. versionchanged:: 2.1
|
||||
|
||||
The ``view`` permission was added.
|
||||
|
||||
``proxy``
|
||||
---------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue