#25559: Conditional admin inline causes ValidationError
--------------------------------+--------------------------------------
Reporter: zborboa-google | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------
Changes (by timgraham):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Please see
[https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_inline_instances
the note for get_inline_instances() in the documentation], "If you
override this method, make sure that the returned inlines are instances of
the classes defined in inlines or you might encounter a “Bad Request”
error when adding related objects." You need
`inlines=[CategoryInlineAdmin]` in the class body I believe. If that's
correct, we might amend the docs.
--
Ticket URL: <https://code.djangoproject.com/ticket/25559#comment:1>
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/072.572586466a592a8129ed25f630e52d8f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.