summaryrefslogtreecommitdiff
path: root/django/newforms/forms.py
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2007-05-24 03:38:26 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2007-05-24 03:38:26 +0000
commit3eab964332c221910641d7e8a493d287ef18faf3 (patch)
tree7bec859e12b381c57233acb2fdd5f2191bebbe30 /django/newforms/forms.py
parentc2cdd2d4b43e65d0b7e900fd5e12f6abd4e1e29c (diff)
newforms-admin: Cleaned up FormSet internals and renamed formset.form_list to formset.forms. Better, but still not quite there.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@5325 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/newforms/forms.py')
-rw-r--r--django/newforms/forms.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/django/newforms/forms.py b/django/newforms/forms.py
index a6409d8504..952530bbd5 100644
--- a/django/newforms/forms.py
+++ b/django/newforms/forms.py
@@ -226,6 +226,12 @@ class BaseForm(StrAndUnicode):
"""
return self.cleaned_data
+ def reset(self):
+ """Return this form to the state it was in before data was passed to it."""
+ self.data = {}
+ self.is_bound = False
+ self.__errors = None
+
class Form(BaseForm):
"A collection of Fields, plus their associated data."
# This is a separate class from BaseForm in order to abstract the way