Ticket #3649: forms_label_formatting.diff

File forms_label_formatting.diff, 972 bytes (added by info@…, 18 years ago)

Changes to newforms forms.py

Line 
119a20,22
2> def escape_label(name):
3> return escape(name + ':')
4>
545c48
6< def __init__(self, data=None, auto_id='id_%s', prefix=None, initial=None):
7---
8> def __init__(self, data=None, auto_id='id_%s', prefix=None, initial=None, label_from_name = pretty_name, escape_label = escape_label):
948a52,53
10> self.label_from_name = label_from_name
11> self.escape_label = escape_label
12102c107
13< bf = BoundField(self, field, name)
14---
15> bf = BoundField(self, field, name, label_from_name = self.label_from_name)
16111c116
17< label = bf.label and bf.label_tag(escape(bf.label + ':')) or ''
18---
19> label = bf.label and bf.label_tag(self.escape_label(bf.label)) or ''
20199c204
21< def __init__(self, form, field, name):
22---
23> def __init__(self, form, field, name,label_from_name = pretty_name):
24205c210
25< self.label = pretty_name(name)
26---
27> self.label = label_from_name(name)
Back to Top