Hello,

I rewrote the forms portion of an application by using newforms.  It's
pretty nice, however there is something extremely annoying: newforms
automatically adds a colon after labels (hopefully, my formatting is
correct):

Out[58]: class ExampleForm(forms.Form):
             name = forms.CharField(label='Your name')
             yob  = forms.CharField(label='Year of birth')

In [59]: example = ExampleForm()

In [60]: print example.as_p()
<p><label for="id_name">Your name:</label> <input type="text"
name="name" id="id_name" /></p>
<p><label for="id_yob">Year of birth:</label> <input type="text"
name="yob" id="id_yob" /></p>


See?  I specified the label to be "You name" and "Year of birth"
without the colon, but newforms adds it automatically.  I think this
is set on line 124 of django.newforms.forms.py:

label = bf.label and bf.label_tag(escape(bf.label + ':')) or ''

I don't think the library should add text like that, what do you
think?

Vincent.

P.S: This code is from 0.96, I haven't checked the Subversion tree.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to