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

Тел: +7 965 3737 888

437

Просмотров

2

Ответов

Parsed RSS into template var

loads a parsed RSS feed (with feedparser) into a variable of choice. Caching by the "cache" template tag.

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

Ответы (2):

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

I've edited it slightly, now it can also take a template-variable. For example:

{% get_rss rss_url as rss %}

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

django-feedutil and django-template-utils both have almost this exact same feature already. But I have to admit, it's kind of nice as a self-contained snippet.