| Home | Trees | Indices | Help |
|---|
|
|
object --+
|
FormPreview
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
preview_template = 'formtools/preview.html'
|
|||
form_template = 'formtools/form.html'
|
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
Given a first-choice name, adds an underscore to the name until it reaches a name that isn't claimed by any field in the form. This is calculated rather than being hard-coded so that no field names are off-limits for use in the form. |
Validates the POST data. If valid, displays the preview page. Else, redisplays form. |
Validates the POST data. If valid, calls done(). Else, redisplays form. |
Given captured args and kwargs from the URLconf, saves something in
self.state and/or raises Http404 if necessary.
For example, this URLconf captures a user_id variable:
(r'^contact/(?P<user_id>\d{1,6})/$', MyFormPreview(MyForm)),
In this case, the kwargs variable in parse_params would be
{'user_id': 32} for a request to '/contact/32/'. You can use that
user_id to make sure it's a valid user and/or save it for later, for
use in done().
|
Calculates the security hash for the given Form instance. This creates a list of the form field names/values in a deterministic order, pickles the result with the SECRET_KEY setting and takes an md5 hash of that. Subclasses may want to take into account request-specific information such as the IP address. |
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Thu Apr 17 18:52:16 2008 | http://epydoc.sourceforge.net |