Kevin Schaul

journalism, graphics, data

A simple solution for integrating Django and WordPress RSS

August 26, 2012

Today I am releasing django-wordpress-rss – a Django template tag for integrating Wordpress articles. It’s available today via PyPI.

This code was developed as an integral piece of the Seattle Times Election Guide. I made it simple to dynamically pull in content based on a WordPress category.

How simple?

1
pip install django-wordpress-rss
1
WORDPRESS_RSS_BASE_URL = 'http://www.kevinschaul.com'
1
2
3
4
5
6
{% load wordpress_rss %}
{% wordpress_rss rss_category 10 as rss_results %}
<ul>{% for item in rss_results %}
    <li><a href="{{ item.href }}">{{ item.title }}</a></li>
</ul>
{% endfor %}

Have ideas for improvement? Open up an issue on GitHub.