diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2010-08-09 21:22:37 +0000 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2010-08-09 21:22:37 +0000 |
commit | 6001ba016a3db4701d56abc6d30868d4e5d88dbf (patch) | |
tree | 7a42c57d802484300c2384d3cd3a968de1804383 /django/forms/forms.py | |
parent | c7bd48cb9f645e5ff07d1e68b86130e3bb2b043f (diff) | |
download | django-soc2010/query-refactor.tar.gz |
[soc2010/query-refactor] Merged up to trunk r13556, resolved merge conflictsarchive/soc2010/query-refactorsoc2010/query-refactor
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2010/query-refactor@13565 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms/forms.py')
-rw-r--r-- | django/forms/forms.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py index b3718efa9a..dc0800b436 100644 --- a/django/forms/forms.py +++ b/django/forms/forms.py @@ -35,7 +35,7 @@ def get_declared_fields(bases, attrs, with_base_fields=True): Also integrates any additional media definitions """ fields = [(field_name, attrs.pop(field_name)) for field_name, obj in attrs.items() if isinstance(obj, Field)] - fields.sort(lambda x, y: cmp(x[1].creation_counter, y[1].creation_counter)) + fields.sort(key=lambda x: x[1].creation_counter) # If this class is subclassing another Form, add that Form's fields. # Note that we loop over the bases in *reverse*. This is necessary in @@ -213,7 +213,7 @@ class BaseForm(StrAndUnicode): normal_row = u'<tr%(html_class_attr)s><th>%(label)s</th><td>%(errors)s%(field)s%(help_text)s</td></tr>', error_row = u'<tr><td colspan="2">%s</td></tr>', row_ender = u'</td></tr>', - help_text_html = u'<br />%s', + help_text_html = u'<br /><span class="helptext">%s</span>', errors_on_separate_row = False) def as_ul(self): @@ -222,7 +222,7 @@ class BaseForm(StrAndUnicode): normal_row = u'<li%(html_class_attr)s>%(errors)s%(label)s %(field)s%(help_text)s</li>', error_row = u'<li>%s</li>', row_ender = '</li>', - help_text_html = u' %s', + help_text_html = u' <span class="helptext">%s</span>', errors_on_separate_row = False) def as_p(self): @@ -231,7 +231,7 @@ class BaseForm(StrAndUnicode): normal_row = u'<p%(html_class_attr)s>%(label)s %(field)s%(help_text)s</p>', error_row = u'%s', row_ender = '</p>', - help_text_html = u' %s', + help_text_html = u' <span class="helptext">%s</span>', errors_on_separate_row = True) def non_field_errors(self): |