title: Date formatting in Django templates
body: <p>I am trying to use the <code>|date</code> filter and running into some problems.  Here is the code that outputs an unformatted way:</p>
  
  <pre><code>{% for the_date in event.date_set.all %}
    &lt;p&gt;{{ the_date }}&lt;/p&gt;
  {% endfor %}
  </code></pre>
  
  <p>this outputs</p>
  
  <pre><code>&lt;p&gt;2010-10-31&lt;/p&gt;
  &lt;p&gt;2010-12-01&lt;/p&gt;
  ...etc
  </code></pre>
  
  <p>When I change the code to</p>
  
  <pre><code>{% for the_date in event.date_set.all %}
    &lt;p&gt;{{ the_date|date:"F j, Y" }}&lt;/p&gt;
  {% endfor %}
  </code></pre>
  
  <p>it only outputs:</p>
  
  <pre><code>&lt;p&gt;&lt;/p&gt;
  &lt;p&gt;&lt;/p&gt;
  ...etc
  </code></pre>
  
  <p>I tried changing the initial format of the dates to different things, but then I get a validation error trying to input the dates, and get a </p>
  
  <pre><code>ValidationError: [u'Enter a valid date in YYYY-MM-DD format.']
  </code></pre>
  
  <p>message.  I am really stumped by this, could anyone help?</p>