Blog Archive for November 15, 2015

Django Forms and Bootstrap

November 15, 2015

I wanted to render a Django form in such a way that it would render nicely in bootstrap.

The following code will render a django form (in this case EntryForm) as nice bootstrap styled html

<form action="." method="post" enctype="multipart/form-data" class="form-horizontal">
{%csrf_token%}
  <fieldset>
        {% for field in EntryForm %} …