diff options
| author | Robin Munn <robin.munn@gmail.com> | 2006-11-08 04:50:01 +0000 |
|---|---|---|
| committer | Robin Munn <robin.munn@gmail.com> | 2006-11-08 04:50:01 +0000 |
| commit | dadfca08c0db567ce33284aaa8eb388cf667a836 (patch) | |
| tree | ab7255eeee1bbe03d95652cc74a3843fa052d8ac /django/forms/__init__.py | |
| parent | 0b059aa4eadc1d95ceca3a32821b65a9fb2a53e8 (diff) | |
sqlalchemy: Merged revisions 3918 to 4053 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/sqlalchemy@4054 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms/__init__.py')
| -rw-r--r-- | django/forms/__init__.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/django/forms/__init__.py b/django/forms/__init__.py index 5f47059f03..0b9ac05edb 100644 --- a/django/forms/__init__.py +++ b/django/forms/__init__.py @@ -108,8 +108,13 @@ class FormWrapper(object): This allows dictionary-style lookups of formfields. It also handles feeding prepopulated data and validation error messages to the formfield objects. """ - def __init__(self, manipulator, data, error_dict, edit_inline=True): - self.manipulator, self.data = manipulator, data + def __init__(self, manipulator, data=None, error_dict=None, edit_inline=True): + self.manipulator = manipulator + if data is None: + data = {} + if error_dict is None: + error_dict = {} + self.data = data self.error_dict = error_dict self._inline_collections = None self.edit_inline = edit_inline |
