title: Is there an easy way to change the format of a datetime input field of a Django form?
body: <p>I understand that in a built-in Django filter called <a href="https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#date" rel="nofollow"><code>date</code></a>.</p>
  
  <p>I want to modify the date format of a <code>DateTimeInput</code>, but I can't figure it out without actually manually writing out the entire HTML. So currently I do something like this:</p>
  
  <pre><code>&lt;input id="{{ field.id_for_label }}" type="text" name="{{ field.name }}" value="{{ field.value|date:"F j, Y, g:i a" }}"
      class="round datetimepicker {% if field.errors %}error-input{% endif %}"
  /&gt;
  </code></pre>
  
  <p>Notice how I use <code>value="{{ field.value|date:"F j, Y, g:i a" }}"</code> (those double quotes actually work).</p>
  
  <p>Is there an easier way to do this? Preferably I would like to keep it the same format as my other input fields:</p>
  
  <pre><code>{{ field|add_class:"round datetimepicker"|add_error_class:"error-input" }}
  </code></pre>
  
  <p>where <code>add_class</code> and <code>add_error_class</code> is from <a href="http://pypi.python.org/pypi/django-widget-tweaks" rel="nofollow">Django widget tweaks app</a>.</p>