Задать вопрос

Тел: +7 965 3737 888

449

Просмотров

1

Ответов

Template-Filter for Feedparser-Dates

<p>A filter that changes a preparsed date from <a href="http://www.feedparser.org/">Ultimate Feedparser</a> to a regular datetime instance. </p>
<p>Now you can -for example- pass a feed parsed by feedparser to a template and do this:</p>
{% for item in feed.entries %}
   Title: {{ item.title }}&lt;br /&gt;
   Date: {{ item.updated_parsed|feedparsed|date:"Y-m-d" }}
{% endfor %}

Вопрос полезен? Да0/Нет0
file_2487.py(176.0б)
None

Ответы (1):

Ответshacker:29.09.2009
Ответ полезен? Да0/Нет0

Brilliant in its simplicity, and exactly what I came looking for. Works perfectly. Thanks!