Skip to content

Commit

Permalink
Merge pull request #11 from rixx/doc_fixes
Browse files Browse the repository at this point in the history
Use correct method signatures in docs
  • Loading branch information
raphaelm committed Jul 14, 2017
2 parents 7df7b39 + aab2276 commit ec69278
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ When using a class-based ``FormView``, you could integrate it like this::
class MySettingsView(FormView):
form_class = MySettingsForm

def get_form_kwargs():
def get_form_kwargs(self):
kwargs = super().get_form_kwargs()
kwargs['attribute_name'] = 'settings'
kwargs['obj'] = User.objects.get(...)
return kwargs

def form_valid(form):
def form_valid(self, form):
form.save()
return super().form_valid(form)

.. note:: Initial values for the form will be taken from the settings storage, i.e. from the given object and the
global and hardcoded defaults. Initial values set directly on the form or field layer are not supported.
global and hardcoded defaults. Initial values set directly on the form or field layer are not supported.

0 comments on commit ec69278

Please sign in to comment.