Welcome to django-feedaggregator’s documentation!¶
Django-feedaggregator is an RSS/Atom feed aggregator (planet) for Django 1.8.
Contents:
Installation¶
- Install the package from pip:
pip install django-feedaggregator
- Add
feedaggregator
,taggit
andtaggit_templatetags2
to INSTALLED_APPS in your settings.py:
INSTALLED_APPS = (
...,
'feedaggregator',
'taggit',
'taggit_templatetags2'
)
- Add feedaggregator urls:
urlpatterns = patterns('',
...,
url(r'^feedaggregator/', include('feedaggregator.urls', namespace='feedaggregator')),
)
- Migrate the database
python manage.py migrate
Done! You’re good to go.
Configuration¶
General settings¶
- FEEDAGGREGATOR_PAGE_SIZE (default: 10)
- How many items display in a page
- FEEDAGGREGATOR_TITLE (default: “Latest posts”)
- Index page tittle
- FEEDAGGREGATOR_SHOW_FULL (default: False)
- If set to True display all the text from the RSS feed
- FEEDAGGREGATOR_EXCERPT_SIZE = (default: 200)
- If FEEDAGGREGATOR_SHOW_FULL is False, this controls the number of words to display per item
RSS Feed settings¶
These settings control generated Feeds not the ones consumed
- FEEDAGGREGATOR_RSS_SIZE (default: 25)
- Number of items per RSS feed
- FEEDAGGREGATOR_RSS_DESCRIPTION (default: “”)
- Text to put in the feed description
Tag settings¶
- FEEDAGGREGATOR_TAGS_LOWERCASE (default:
True
) - If True all the tags are converted to lowercase
Python -> python
Management commands¶
The import_opml
command¶
$ python manage.py import_opml http://planetpython.org/opml.xml
Import all the feed urls defined in the OPML file passed as parameter to the database. It didn’t fetch the feed data, to do this run update_feeds
.
The update_feeds
command¶
$ python manage.py update_feeds
Update all the active feeds in the project.
Template Tags¶
Feedaggregator provide several custom template tags based on inclusion_tag to customize look’n feel. To use any of the following template tags you need to load them at the top of your template:
{% load feedaggregator_tags %}
feedaggregator_feed_list¶
Show all the active feeds
feedaggregator_latest_items¶
Show the latest items
feedaggregator_popular_tags¶
Show the most used tags