1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #2109 -- Convert old-style classes to new-style classes throughout Django. Thanks, Nicola Larosa

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3113 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty
2006-06-08 05:00:13 +00:00
parent 5edd1335b2
commit 2abfd5dd58
33 changed files with 63 additions and 64 deletions

View File

@@ -101,7 +101,7 @@ class Manipulator(object):
for field in self.fields:
field.convert_post_data(new_data)
class FormWrapper:
class FormWrapper(object):
"""
A wrapper linking a Manipulator to the template system.
This allows dictionary-style lookups of formfields. It also handles feeding
@@ -150,7 +150,7 @@ class FormWrapper:
fields = property(_get_fields)
class FormFieldWrapper:
class FormFieldWrapper(object):
"A bridge between the template system and an individual form field. Used by FormWrapper."
def __init__(self, formfield, data, error_list):
self.formfield, self.data, self.error_list = formfield, data, error_list
@@ -211,7 +211,7 @@ class FormFieldCollection(FormFieldWrapper):
def html_combined_error_list(self):
return ''.join([field.html_error_list() for field in self.formfield_dict.values() if hasattr(field, 'errors')])
class InlineObjectCollection:
class InlineObjectCollection(object):
"An object that acts like a sparse list of form field collections."
def __init__(self, parent_manipulator, rel_obj, data, errors):
self.parent_manipulator = parent_manipulator
@@ -269,7 +269,7 @@ class InlineObjectCollection:
self._collections = collections
class FormField:
class FormField(object):
"""Abstract class representing a form field.
Classes that extend FormField should define the following attributes: