title: How do I display the value of a Django form field in a template?
body: <p>I have a form with an email property.</p>
  
  <p>When using <code>{{ form.email }}</code> in case of some validation error, Django still renders the previous value in the input tag's value attribute:</p>
  
  <pre><code>&lt;input type="text" id="id_email" maxlength="75" class="required"
         value="some@email.com" name="email"&gt;
  </code></pre>
  
  <p>I want to render the input tag myself (to add some JavaScript code and an error class in case of an error). For example this is my template instead of <code>{{ form.email }}</code>:</p>
  
  <pre><code>&lt;input type="text" autocomplete="on" id="id_email" name="email"
         class="email {% if form.email.errors %} error {% endif %}"&gt;
  </code></pre>
  
  <p>However, this does not display the erroneous value (<code>some@email.com</code> in this example) to the user.</p>
  
  <p>How do I get the field's value in the template?</p>