Loading django/views/generic/edit.py +2 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ class FormMixin(ContextMixin): def get_form_kwargs(self): """ Returns the keyword arguments for instanciating the form. Returns the keyword arguments for instantiating the form. """ kwargs = {'initial': self.get_initial()} if self.request.method in ('POST', 'PUT'): Loading Loading @@ -87,7 +87,7 @@ class ModelFormMixin(FormMixin, SingleObjectMixin): def get_form_kwargs(self): """ Returns the keyword arguments for instanciating the form. Returns the keyword arguments for instantiating the form. """ kwargs = super(ModelFormMixin, self).get_form_kwargs() kwargs.update({'instance': self.object}) Loading Loading
django/views/generic/edit.py +2 −2 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ class FormMixin(ContextMixin): def get_form_kwargs(self): """ Returns the keyword arguments for instanciating the form. Returns the keyword arguments for instantiating the form. """ kwargs = {'initial': self.get_initial()} if self.request.method in ('POST', 'PUT'): Loading Loading @@ -87,7 +87,7 @@ class ModelFormMixin(FormMixin, SingleObjectMixin): def get_form_kwargs(self): """ Returns the keyword arguments for instanciating the form. Returns the keyword arguments for instantiating the form. """ kwargs = super(ModelFormMixin, self).get_form_kwargs() kwargs.update({'instance': self.object}) Loading