summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-04-02 14:14:16 -0700
committerTim Graham <timograham@gmail.com>2018-04-04 14:32:35 -0400
commitb31a9149e1e27c1d57521f7cf0f4ac61f577e6b4 (patch)
tree821dc63cc0e34cf6f33e66655f2ec34f6b602bd1 /docs
parent6148dda72f47e40754fc2eb75d86274fb68f2d41 (diff)
Documented InlineModelAdmin.has_(add/change/delete)_permission().
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/contrib/admin/index.txt20
1 files changed, 16 insertions, 4 deletions
diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
index cc0cf87c8a..1a74794754 100644
--- a/docs/ref/contrib/admin/index.txt
+++ b/docs/ref/contrib/admin/index.txt
@@ -2231,12 +2231,9 @@ adds some of its own (the shared features are actually defined in the
- :meth:`~ModelAdmin.formfield_for_choice_field`
- :meth:`~ModelAdmin.formfield_for_foreignkey`
- :meth:`~ModelAdmin.formfield_for_manytomany`
-- :meth:`~ModelAdmin.has_add_permission`
-- :meth:`~ModelAdmin.has_change_permission`
-- :meth:`~ModelAdmin.has_delete_permission`
- :meth:`~ModelAdmin.has_module_permission`
-The ``InlineModelAdmin`` class adds:
+The ``InlineModelAdmin`` class adds or customizes:
.. attribute:: InlineModelAdmin.model
@@ -2398,6 +2395,21 @@ The ``InlineModelAdmin`` class adds:
inline forms. For example, this may be based on the model instance
(passed as the keyword argument ``obj``).
+.. method:: InlineModelAdmin.has_add_permission(request)
+
+ Should return ``True`` if adding an inline object is permitted, ``False``
+ otherwise.
+
+.. method:: InlineModelAdmin.has_change_permission(request, obj=None)
+
+ Should return ``True`` if editing an inline object is permitted, ``False``
+ otherwise. ``obj`` is the parent object being edited.
+
+.. method:: InlineModelAdmin.has_delete_permission(request, obj=None)
+
+ Should return ``True`` if deleting an inline object is permitted, ``False``
+ otherwise. ``obj`` is the parent object being edited.
+
Working with a model with two or more foreign keys to the same parent model
---------------------------------------------------------------------------