Show content from an XML feed on your own site.
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.
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.
Include the externalfeed URLconf in your project urls.py like this, or optionally roll your own:
With the above settings, say the bbc rss feed has an item with this url:
This item will then be visible on your site at:
When the item is no longer in the rss feed, the item is no longer visible on your site.
Tested with Django 1.4.3. It is expected to work fine on Django 1.3 or higher.