On Monday, 9 July 2012 12:06:32 UTC+1, mapapage wrote:
>
> Hi!
> In my django app I'm using modelForms and not simple django forms so in 
> order to render the form I just do  {{ form.as_table }} an the template and 
> everything is being displayed. 
> That's simple, but obviously any html code is being skipped, so I wonder 
> how will I further customize my form (css stuff etc)+(I'd like to use 
> twitter bootstrap) 
> Is there any way? I also want to upload a file, but how am I going to add 
> the required header * <form method="post" action='./'{% if 
> form.is_multipart %} enctype='multipart/form-data'{% endif %}> *since my 
> form is being automatically rendered only by {{ form.as_table }}? It 
> confuses me.. can anyone help?
>
> Thanks in advance
>
>
You *always* need to supply the wrapping <form> ... </form> tags yourself. 
form.as_table doesn't output them.

However to answer the rest of your question, see the documentation:
https://docs.djangoproject.com/en/1.4/topics/forms/#customizing-the-form-template
where this is discussed in detail.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/ZqbCWn02KhsJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to