1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #16236 -- Added get_form_kwargs method to WizardView as a way to easily provide kwargs to each step form.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Jannis Leidel
2011-06-14 10:35:02 +00:00
parent 3ee076b135
commit b5e7eab9fd
3 changed files with 43 additions and 2 deletions

View File

@@ -271,6 +271,16 @@ Advanced ``WizardView`` methods
def get_form_initial(self, step):
return self.initial_dict.get(step, {})
.. method:: WizardView.get_form_kwargs(step)
Returns a dictionary which will be used as the keyword arguments when
instantiating the form instance on given ``step``.
The default implementation::
def get_form_kwargs(self, step):
return {}
.. method:: WizardView.get_form_instance(step)
Returns a object which will be passed to the form for ``step`` as