Ticket #9122: generic_inline.diff
File generic_inline.diff, 898 bytes (added by , 16 years ago) |
---|
-
django/contrib/contenttypes/generic.py
345 345 raise Exception("fk_name '%s' is not a ForeignKey to ContentType" % ct_field) 346 346 fk_field = opts.get_field(fk_field) # let the exception propagate 347 347 if exclude is not None: 348 exclude = list(exclude) # make sure we have list not tuple 348 349 exclude.extend([ct_field.name, fk_field.name]) 349 350 else: 350 351 exclude = [ct_field.name, fk_field.name] … … 377 378 "can_delete": True, 378 379 "can_order": False, 379 380 "fields": fields, 381 "max_num": self.max_num, 382 "exclude": self.exclude 380 383 } 381 384 return generic_inlineformset_factory(self.model, **defaults) 382 385