I am trying to use the |date
filter and running into some problems. Here is the code that outputs an unformatted way:
{% for the_date in event.date_set.all %}
<p>{{ the_date }}</p>
{% endfor %}
this outputs
<p>2010-10-31</p>
<p>2010-12-01</p>
...etc
When I change the code to
{% for the_date in event.date_set.all %}
<p>{{ the_date|date:"F j, Y" }}</p>
{% endfor %}
it only outputs:
<p></p>
<p></p>
...etc
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
ValidationError: [u'Enter a valid date in YYYY-MM-DD format.']
message. I am really stumped by this, could anyone help?