but i have other tags in my html like <section> and <fieldset> !! how can i
render them ??
On Wednesday, 2 April 2014 03:49:39 UTC+1, somecallitblues wrote:
>
> You can use {{form.field_name}} to render the input tag,
> {{form.field_name.label}} to render the label
> and {{form.field_name.errors}} to render field errors. Simple example:
>
> <div class="span6">
> <div class="control-group required">
> <label for="id_comments"
> class="control-label">{{ reorder_form.comments.label }}</label>
> <div class="controls">
> {{ reorder_form.comments.errors }}
> {{ reorder_form.comments }}
> </div>
> </div>
> </div>
>
> To add attributes to the input tag, such as classes, placeholder etc. you
> need to add them as attrs dictionary parameter inside the widget class.
>
> e.g. comment = forms.CharField(label="Please submit your comment below",
> widget=forms.Textarea(attrs={"class":"span6"}))
>
> You can also create a filter for rendering your own markup. Perhaps you
> can take a look at bootstrap toolkit package for example. In particular
> {{form|as_bootstrap}}
>
>
> On 1 April 2014 22:50, Mike Dewhirst <[email protected]
> <javascript:>>wrote:
>
>> On 1/04/2014 8:12 PM, Daniel Roseman wrote:
>>
>>> On Tuesday, 1 April 2014 00:40:44 UTC+1, Fred DJar wrote:
>>>
>>> HELP PLEASE
>>>
>>
>> I agree with DR but it might be interesting to know what your problem
>> might be ...
>>
>>
>>>
>>> No.
>>>
>>> You don't get to demand that people help you. If someone knows the
>>> answer to your question, and they have time to answer - and if they can
>>> work out what you're asking, which isn't obvious - they will reply. But
>>> if you want help on demand, you need to pay someone.
>>> --
>>> DR.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected] <javascript:>
>>> <mailto:[email protected] <javascript:>>.
>>>
>>> To post to this group, send email to [email protected]<javascript:>
>>> <mailto:[email protected] <javascript:>>.
>>>
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/162b8220-
>>> 9c99-4f7f-ad36-7701d6a40451%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/162b8220-
>>> 9c99-4f7f-ad36-7701d6a40451%40googlegroups.com?utm_medium=
>>> email&utm_source=footer>.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/
>> msgid/django-users/533AA81F.3070205%40dewhirst.com.au.
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/47b488d5-c986-4b76-9728-fe83279b3f9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.