> class MyForm(forms.Form):
>      field1 = forms.CharField(max_length=100)
>      field2 = forms.Charfield(max_length=100, label='custom field')
> 
> When I render the field, the label for field1 get his first character
> uppercased and becomes "Field1", the label for field2 was set by the
> label keyword and this value doesn't get passed through pretty_name
> function and keeps "custom field" (without the first letter
> uppercase).
> 
> I couldn't figure out if this is a bug or a design decision.

I'd say it's a design decision:  Django makes a smart guess as to 
what to make the default, but if you specify "this is my label", 
it should use it verbatim.  So if you have

   x = forms.CharField(max_length=10, label='mY l33t f13Ld')

It should assume you know what you're rambling about and just use it.

If you need it, you can always do something like

   label=pretty_name('custom field')

-tkc




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to