summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorJulien Phalip <jphalip@gmail.com>2011-12-19 13:13:41 +0000
committerJulien Phalip <jphalip@gmail.com>2011-12-19 13:13:41 +0000
commit1ef6841cade19b06508f74d8602acee0805e88b5 (patch)
tree7c6990cea26f8e868e1d4ee8b2cda2158def44a9 /docs/ref
parented56e2c4a8f459362ae83cfce03d82193adac6ef (diff)
Fixed #17162 -- Removed the useless `WizardView.get_wizard_name()` method. Thanks, Bradley Ayers and Stephan Jaekel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17234 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/contrib/formtools/form-wizard.txt23
1 files changed, 8 insertions, 15 deletions
diff --git a/docs/ref/contrib/formtools/form-wizard.txt b/docs/ref/contrib/formtools/form-wizard.txt
index 01f5567706..58cb0e28d2 100644
--- a/docs/ref/contrib/formtools/form-wizard.txt
+++ b/docs/ref/contrib/formtools/form-wizard.txt
@@ -314,28 +314,21 @@ Advanced ``WizardView`` methods
context.update({'another_var': True})
return context
-.. method:: WizardView.get_wizard_name()
+.. method:: WizardView.get_prefix(*args, **kwargs)
- This method can be used to change the wizard's internal name.
-
- Default implementation::
-
- def get_wizard_name(self):
- return normalize_name(self.__class__.__name__)
-
-.. method:: WizardView.get_prefix()
-
- This method returns a prefix for the storage backends. These backends use
- the prefix to fetch the correct data for the wizard. (Multiple wizards
- could save their data in one session)
+ This method returns a prefix for use by the storage backends. Backends use
+ the prefix as a mechanism to allow data to be stored separately for each
+ wizard. This allows wizards to store their data in a single backend
+ without overwriting each other.
You can change this method to make the wizard data prefix more unique to,
e.g. have multiple instances of one wizard in one session.
Default implementation::
- def get_prefix(self):
- return self.wizard_name
+ def get_prefix(self, *args, **kwargs):
+ # use the lowercase underscore version of the class name
+ return normalize_name(self.__class__.__name__)
.. method:: WizardView.get_form(step=None, data=None, files=None)