Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#9505 closed (duplicate)

Generic Inlines no longer work

Reported by: SmileyChris Owned by: brosner
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


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/", line 71, in render_node
    result = node.render(context)
  File "/usr/lib/python2.5/site-packages/django/template/", line 122, in render
    values = list(values)
  File "/usr/lib/python2.5/site-packages/django/contrib/admin/", line 112, in fields
    if == field_name:
AttributeError: 'PromoFormFormSet' object has no attribute 'fk'

With a minor bit of digging, it seems that generic_inlineformset_factory doesn't set = fk like the base inlineformset_factory does, hence there's no fk attribute.

Change History (2)

comment:1 Changed 7 years ago by brosner

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #9498.

comment:2 Changed 7 years ago by SmileyChris

Apologies Brian. I did a quick look through the timeline, dunno how I missed that :P

Note: See TracTickets for help on using tickets.
Back to Top