summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-07-25 09:30:54 -0400
committerTim Graham <timograham@gmail.com>2015-07-25 09:30:54 -0400
commit217f173be025d2cce6484c760ea6ec77436f26a1 (patch)
tree598a6bf521560e80e10d2b3d5d619a0ede0faa71
parentc6da621def9bc04a5feacd5652c7f9d84f48ad2c (diff)
Fixed #25166 -- Clarified how auth permissions are created.
Thanks Baptiste Mispelon for report and review.
-rw-r--r--docs/topics/auth/customizing.txt11
-rw-r--r--docs/topics/auth/default.txt3
2 files changed, 8 insertions, 6 deletions
diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt
index 7745574d5d..7d3f6fee9e 100644
--- a/docs/topics/auth/customizing.txt
+++ b/docs/topics/auth/customizing.txt
@@ -281,11 +281,12 @@ can or cannot do with Task instances, specific to your application::
)
The only thing this does is create those extra permissions when you run
-:djadmin:`manage.py migrate <migrate>`. Your code is in charge of checking the
-value of these permissions when a user is trying to access the functionality
-provided by the application (viewing tasks, changing the status of tasks,
-closing tasks.) Continuing the above example, the following checks if a user may
-view tasks::
+:djadmin:`manage.py migrate <migrate>` (the function that creates permissions
+is connected to the :data:`~django.db.models.signals.post_migrate` signal).
+Your code is in charge of checking the value of these permissions when a user
+is trying to access the functionality provided by the application (viewing
+tasks, changing the status of tasks, closing tasks.) Continuing the above
+example, the following checks if a user may view tasks::
user.has_perm('app.view_task')
diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt
index 925f8a307c..29447982f6 100644
--- a/docs/topics/auth/default.txt
+++ b/docs/topics/auth/default.txt
@@ -205,7 +205,8 @@ These permissions will be created when you run :djadmin:`manage.py migrate
will be created for all previously-installed models, as well as for any new
models being installed at that time. Afterward, it will create default
permissions for new models each time you run :djadmin:`manage.py migrate
-<migrate>`.
+<migrate>` (the function that creates permissions is connected to the
+:data:`~django.db.models.signals.post_migrate` signal).
Assuming you have an application with an
:attr:`~django.db.models.Options.app_label` ``foo`` and a model named ``Bar``,