Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added parse_params() hook to FormWizard

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7263 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b1dbff729fa11be2a02461e5fec9ba0eb1c2ffe6 1 parent e461e73
@adrianholovaty adrianholovaty authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 django/contrib/formtools/wizard.py
View
10 django/contrib/formtools/wizard.py
@@ -49,6 +49,7 @@ def __call__(self, request, *args, **kwargs):
if 'extra_context' in kwargs:
self.extra_context.update(kwargs['extra_context'])
current_step = self.determine_step(request, *args, **kwargs)
+ self.parse_params(request, *args, **kwargs)
# Sanity check.
if current_step >= self.num_steps():
@@ -167,6 +168,15 @@ def determine_step(self, request, *args, **kwargs):
return 0
return step
+ def parse_params(self, request, *args, **kwargs):
+ """
+ Hook for setting some state, given the request object and whatever
+ *args and **kwargs were passed to __call__(), sets some state.
+
+ This is called at the beginning of __call__().
+ """
+ pass
+
def get_template(self, step):
"""
Hook for specifying the name of the template to use for a given step.
Please sign in to comment.
Something went wrong with that request. Please try again.