Django

Code

Ticket #5919: 09-inline-parent-instance.diff

File 09-inline-parent-instance.diff, 0.6 kB (added by Petr Marhoun <petr.marhoun@gmail.com>, 1 year ago)
  • django/newforms/models.py

    old new  
    361361 
    362362class InlineFormset(BaseModelFormSet): 
    363363    """A formset for child objects related to a parent.""" 
    364     def __init__(self, instance, data=None, files=None): 
     364    def __init__(self, instance=None, data=None, files=None): 
    365365        from django.db.models.fields.related import RelatedObject 
    366366        self.instance = instance 
    367367        # is there a better way to get the object descriptor?