#18619: make sure get_inline_instances() follows the same API convention as the
other functions
--------------------------------------+----------------------
Reporter: sjaensch | Owner: sjaensch
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
--------------------------------------+----------------------
When developing the patch for ticket #8060, I missed the fact that the
BaseModelAdmin / ModelAdmin API in django.contrib.admin.options passes an
instance object where applicable, paving the way for implementations of
object-level permissions. Therefore, the newly created method
get_inline_instances should accept an instance parameter and pass it along
accordingly.
Similar ModelAdmin methods that already support the instance parameter are
get_fieldsets(), get_readonly_fields(), get_prepopulated_fields() or
get_formsets().
I'll post the link to the pull request as a comment. The patch passes the
Django test suite.
--
Ticket URL: <https://code.djangoproject.com/ticket/18619>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.