On 22-Jan-08, at 6:35 PM, shabda wrote:
> My template is
>
> {% for field in form %}
>
> {{ field.label_tag }}
> {{field}}
> {% if field.help_text
> %}{{ field.help_text }}{% endif %}
> {% if field.errors %} class="myerrors">{{ field.errors }}{% endif %}
My template is
{% for field in form %}
{{ field.label_tag }}
{{field}}
{% if field.help_text
%}{{ field.help_text }}{% endif %}
{% if field.errors %}{{ field.errors }}{% endif %}
{% endfor %}
How can I check the name of the current field?
On Jan
On 22-Jan-08, at 5:45 PM, shabda wrote:
> I want to have the one of the field for my form have a specific css
> class. But if I do something like,
> widget = forms.TextInput(attrs = {'size':60, 'class':'main'}
> The textInput, and not its associated label gets the class. How can I
> specify the
I want to have the one of the field for my form have a specific css
class. But if I do something like,
widget = forms.TextInput(attrs = {'size':60, 'class':'main'}
The textInput, and not its associated label gets the class. How can I
specify the class for label?
--~--~-~--~~---
4 matches
Mail list logo