Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit a983d2c May 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
rssplugin Add missing migration May 23, 2019
.gitattributes created django cms rss plugin Feb 8, 2013
.gitignore created django cms rss plugin Feb 8, 2013
CHANGES.rst Update CHANGES.rst Oct 6, 2015
MANIFEST.in bug fixing. Feb 15, 2013
README.rst improved README Jan 2, 2017
setup.py mention Python 3 compatibility in setup.py Jan 2, 2017

README.rst

Django CMS RSS Plugin

Simple plugin to show an RSS feed in your django cms site.

Features

  • Show specified number of feeds in the page.
  • You can choose to open the feed in current window or new window.
  • Show any RSS feed you specified, it can be your external RSS url, or your internal RSS relative url like '/myblog/rss'.
  • The feed list would be cached for specified time long.
  • You can choose the template of your RSS feed or use the default

Usage

Installation:

$ pip install django-rss-plugin

Add rssplugin to your INSTALLED_APPS in Django settings.py file, Like following:

INSTALLED_APPS=(
      'rssplugin',
)

Django >= 1.7:

Run django migrate to install plugin database:

$ python manage.py migrate rssplugin

Django and South:

In your settings.py file, set the south migration module:

SOUTH_MIGRATION_MODULES = {
  'rssplugin': 'rssplugin.south_migrations',
}

Run south migrate to install plugin database:

$ python manage.py migrate rssplugin

Django < 1.7 without South:

$ python manage.py syncdb

template filter

  1. parsed_to_date:

    {% load rss_tags %}
    {{ entry.published_parsed|parsed_to_date|timesince }}
    

see rss.html for usage examples.

Notice, both external link like 'http://example.com/rss' and internal link like '/blog/rss' are supported.

Using custom templates

Use CMS_RSS_PLUGIN_TEMPLATE = "path_to_your_template.html" in settings.py to set a custom template, default is rss/rss.html.

If you specify CMS_RSS_PLUGIN_TEMPLATES instead, rssplugin offers authors an optional choice of custom templates.

Example:

CMS_RSS_PLUGIN_TEMPLATES = (
    ('short.html', gettext('Short')),
    ('long.html', gettext('Long')),
    ('mailing_list.html', gettext('List Server')),
)

For a reference of the feed and entry attributes you can use in your templates, have a look at the feedparser dokumentation: https://pythonhosted.org/feedparser/

Feed timeout

Use CMS_RSS_PLUGIN_FEEDPARSER_TIMEOUT = seconds in settings.py to set a custom socket timeout, default is 60

Online Resources

You can’t perform that action at this time.