Ticket #9498: generic.py.r9329_2.diff

File generic.py.r9329_2.diff, 728 bytes (added by markus _forgot_ evigo _spam_ net, 16 years ago)
  • contrib/contenttypes/generic.py

    old new  
    347347   
    348348    if exclude is not None:
    349349        exclude.extend([ct_field.name, fk_field.name])
    350     else:
    351         exclude = [ct_field.name, fk_field.name]
    352350   
    353351    FormSet = modelformset_factory(model, form=form,
    354352                                   formfield_callback=formfield_callback,
     
    357355                                   fields=fields, exclude=exclude, max_num=max_num)
    358356    FormSet.ct_field = ct_field
    359357    FormSet.ct_fk_field = fk_field
     358    FormSet.fk = fk_field
    360359    return FormSet
    361360
    362361class GenericInlineModelAdmin(InlineModelAdmin):
Back to Top