Ticket #9498: generic.py.r9329_2.diff
File generic.py.r9329_2.diff, 728 bytes (added by , 16 years ago) |
---|
-
contrib/contenttypes/generic.py
old new 347 347 348 348 if exclude is not None: 349 349 exclude.extend([ct_field.name, fk_field.name]) 350 else:351 exclude = [ct_field.name, fk_field.name]352 350 353 351 FormSet = modelformset_factory(model, form=form, 354 352 formfield_callback=formfield_callback, … … 357 355 fields=fields, exclude=exclude, max_num=max_num) 358 356 FormSet.ct_field = ct_field 359 357 FormSet.ct_fk_field = fk_field 358 FormSet.fk = fk_field 360 359 return FormSet 361 360 362 361 class GenericInlineModelAdmin(InlineModelAdmin):