Show content from an XML feed on your own site.
Project description
django-external-feed
Show content from an XML feed on your own site. This allows you to use a commercial weblog service, yet you can still integrate the news articles within your site.
Quick start
Add “externalfeed” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = ( ... 'externalfeed', )
Configure the feeds in your settings:
FEED_SOURCES = ( # (key, source, prefix to strip from the url) ('bbc', 'http://feeds.bbci.co.uk/news/rss.xml', 'http://www.bbc.co.uk/news'), )
Note: not all external sources may allow you to embed their content like this. You should check their terms of service.
The key is a text of your choosing that will end up in the url on your website.
The source is the url to an rss, atom or other syndication feed. We use feedparser to parse this.
The feed will have a url for each item. The prefix is the part that we strip from this url. The remainder of the url will end up in the url that makes this item available on your website. If the url does not match the prefix, we take the part after the domain name.
Include the externalfeed URLconf in your project urls.py like this, or optionally roll your own:
url(r'^externalnews/', include('externalfeed.urls')),
With the above settings, say the bbc rss feed has an item with this url:
http://www.bbc.co.uk/news/uk-england-cumbria-23341015
This item will then be visible on your site at:
<your-domain>/externalnews/bbc/uk-england-cumbria-23341015
When the item is no longer in the rss feed, the item is no longer visible on your site.
Compatibility
Tested with Django 1.4.3. It is expected to work fine on Django 1.3 or higher.
Changelog
0.1 (2013-07-18)
Initial release. [maurits]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.