#9505 closed (duplicate)
Generic Inlines no longer work
| Reported by: | Chris Beaven | Owned by: | Brian Rosner |
|---|---|---|---|
| Component: | Forms | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
As of r9297, generic inlines are broken.
Example traceback (where the form has a PromoInline which is based off GenericInline):
File "/usr/lib/python2.5/site-packages/django/template/debug.py", line 71, in render_node
result = node.render(context)
File "/usr/lib/python2.5/site-packages/django/template/defaulttags.py", line 122, in render
values = list(values)
File "/usr/lib/python2.5/site-packages/django/contrib/admin/helpers.py", line 112, in fields
if self.formset.fk.name == field_name:
AttributeError: 'PromoFormFormSet' object has no attribute 'fk'
With a minor bit of digging, it seems that generic_inlineformset_factory doesn't set Formset.fk = fk like the base inlineformset_factory does, hence there's no fk attribute.
Change History (2)
comment:1 by , 17 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
comment:2 by , 17 years ago
Apologies Brian. I did a quick look through the timeline, dunno how I missed that :P
Note:
See TracTickets
for help on using tickets.
Duplicate of #9498.