title: Get the type of field in django template
body: <p>I am using django forms and I want to use Twitter Bootstrap's css in my html.
  so my template looks like this:</p>
  
  <pre><code>{% for field in form %}
      &lt;div class="form-group"&gt;
          {{ field.label_tag }}&lt;!--Same thing as : &lt;label for="{{field.id_for_label}}"&gt;&lt;/label&gt; --&gt;
  
          &lt;input type="{{field.type}}" class="form-control" id="{{field.auto_id}}" placeholder="Email"&gt;
        &lt;/div&gt;
  {% endfor %}
  </code></pre>
  
  <p>I can't figure out out to get the type value. <code>{{field.type}}</code> . </p>
  
  <p>Is there any way to get the type of the input field in django templates?</p>
  
  <p>Thanks in advance</p>
  
  <p><strong>Update:</strong>
  The reason I am asking this question is because I want to be able to apply bootstrap classes to the input element. But in Bootstrap3, to use the default css for input types you would have to add form-control class to the input element like so: <code>&lt;input type="text" class="form-control" id="{{field.auto_id}}" placeholder=""&gt;.</code></p>
  
  <p>If I use django's field <code>{{field}}</code> then I can't add the form-control class. 
  I hope this clarifies some things. </p>
  
  <p>I also saw this app <a href="https://github.com/dyve/django-bootstrap3" rel="noreferrer">https://github.com/dyve/django-bootstrap3</a> that looks like it does what I wanted to do. It surprises me that django doesn't allow accessing the form type to allow more flexibility. </p>