django-wordpress-rssA Django template tag for integrating Wordpress articles | |
Download |
django-wordpress-rss Ranking & Summary
Advertisement
- License:
- MIT/X Consortium Lic...
- Price:
- FREE
- Publisher Name:
- Kevin Schaul
- Publisher web site:
- http://www.kevinschaul.com
django-wordpress-rss Tags
django-wordpress-rss Description
django-wordpress-rss is a Django template tag for integrating Wordpress articles.Check out the project on GitHub for the latest information http://github.com/kevinschaul/django-wordpress-rssInstallationInstall from PyPI using pip: pip install django-wordpress-rssAdd `wordpress_rss` to your settings.py file: INSTALLED_APPS = ( ... 'wordpress_rss', ... )Add `WORDPRESS_RSS_BASE_URL` to your settings.py file, excluding the trailing slash: WORDPRESS_RSS_BASE_URL = 'http://www.kevinschaul.com'UsageLoad the new template tag: {% load wordpress_rss %}Configure it. The arguments are as follows:1. The template tag (`wordpress_rss`)2. A variable containing a string represenation of a category to pull from3. The number of articles to pull4. (as)5. A template variable to save the results inThe resulting template variable will be an array containing rss items, with proerties `href` and `title` (more are planned, feel free to open an issue on GitHub).Full example:settings.py WORDPRESS_RSS_BASE_URL = 'http://www.kevinschaul.com'views.py return render(request, 'index.html', {'rss_category': 'widsom'})index.html {% load wordpress_rss %} {% wordpress_rss rss_category 10 as rss_results %} {% for item in rss_results %} {{ item.title }} {% endfor %} Product's homepage
django-wordpress-rss Related Software