summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-08-01 11:31:34 -0400
committerTim Graham <timograham@gmail.com>2013-08-09 09:19:52 -0400
commitddae74b64ccb1173e3f2f06d54dd45643130f9e0 (patch)
tree5561450d57e4ba58f8cce2d6d20b057ce388cd61 /docs
parent9c711ee3a6a638add26d19dad70447c981371598 (diff)
Fixed #9057 -- Added default_permissions model meta option.
Thanks hvendelbo for the suggestion and koenb for the draft patch.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/options.txt13
-rw-r--r--docs/releases/1.7.txt4
2 files changed, 17 insertions, 0 deletions
diff --git a/docs/ref/models/options.txt b/docs/ref/models/options.txt
index 7d751a53fe..3e8f64c37a 100644
--- a/docs/ref/models/options.txt
+++ b/docs/ref/models/options.txt
@@ -235,6 +235,19 @@ Django quotes column and table names behind the scenes.
This is a list or tuple of 2-tuples in the format ``(permission_code,
human_readable_permission_name)``.
+``default_permissions``
+------------------------------
+
+.. attribute:: Options.default_permissions
+
+ .. versionadded:: 1.7
+
+ 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:`syncdb` in order to prevent any omitted
+ permissions from being created.
+
``proxy``
---------
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt
index 26a0beeece..6c28d6e1d0 100644
--- a/docs/releases/1.7.txt
+++ b/docs/releases/1.7.txt
@@ -131,6 +131,10 @@ Minor features
return ``self.cleaned_data``. If it does return a changed dictionary then
that will still be used.
+* The new :attr:`~django.db.models.Options.default_permissions` model
+ ``Meta`` option allows you to customize (or disable) creation of the default
+ add, change, and delete permissions.
+
Backwards incompatible changes in 1.7
=====================================