(self)
return initial
Returns the initial data to use for forms on this view.
Returns the initial data to use for forms on this view.
Returns the initial data to use for forms on this view .
def get_initial(self):
        """
        Returns the initial data to use for forms on this view.
        """
        initial = super(RecipeForm, self).get_initial()
        for field in self.Meta.fields:
            initial[field] = getattr(self.instance, field)

        return initial
def get_initial ( self ) : initial = super ( RecipeForm , self ) . get_initial ( ) for field in self . Meta . fields : initial [ field ] = getattr ( self . instance , field ) return initial