#15602: Using get_readonly_fields and StackedInline/TabularInline admin objects
doesn't allow creating new objects, immutible existing objects
---------------------------------+------------------------------------
     Reporter:  bradwhittington  |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  contrib.admin    |                  Version:  master
     Severity:  Normal           |               Resolution:
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------

Comment (by Carlton Gibson):

 Given the change it would involve, I think this will probably need to be
 resolved as a documentation issue.

 That they're passed the parent object means that `get_readonly_fields()`
 &co as they appear on an inline have the same signature but a different
 semantics from when they appear on the normal ModelAdmin. As such, they
 should be documented separately in the
 [https://docs.djangoproject.com/en/2.1/ref/contrib/admin
 /#inlinemodeladmin-objects InlineModelAdmin ref].

 Similar differences are already documented for
 
[https://docs.djangoproject.com/en/2.1/ref/contrib/admin/#django.contrib.admin.InlineModelAdmin.has_add_permission
 the various InlineModelAdmin versions of the `has_<value>_permission()`
 methods].

 On the actual issue, could it be resolved with permissions? If you have
 `add` but not `change` on the inline model (possibly via custom
 `has_add_permission()` and `has_change_permission()` methods) do you not
 get the `allow creating new objects, immutible existing objects` from the
 title?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/15602#comment:21>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/073.14457f463b811fbbef5eb387fecd7f05%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to