On 26/10/2007, Luke <[EMAIL PROTECTED]> wrote:
>
> I am processing a form that is built from a model using
> form_for_model.  In the model I specified a verbose_name for each
> field.  I can, of course, get the form values through
> form.cleaned_data when it is returned, but I cannot figure out where
> verbose_name is located.  I need this to produce the output, and do
> not want to repeat myself, since it is already defined in the model.

See the section entitled "Complex template output" in newforms.txt
documentation file which explains this very case.

The answer is use {{form.FIELDNAME.label_tag}} in your template.

Cheers,

-- 
Phil Davis

--~--~---------~--~----~------------~-------~--~----~
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