What I’d like to do is extract the headline and URL out of the feed data from my wordpress blog, and display it as a link within my Django template.
I found this example
But it doesn’t prove useful in Django. (I’m a n00b). So I was wondering if anyone had any suggestions on how I might grab the feeb and place it into a Django application?
<a href="link-to-feed">Title of blog post</a>
Thank you for your help in advance.
Basically you need to parse your wordpress feed in your Django View, then send that rendered data to your template.
Good Resource
also feedparser specs: http://pythonhosted.org/feedparser/
Do some research in parsing XML with Python in your Django view
I know this thread is old, but I found this to be really helpful too:
http://geekscrap.com/2010/02/integrate-wordpress-and-django/
I’m using option 2, the xmlrpc. here’s the github page for examples
https://github.com/maxcutler/python-wordpress-xmlrpc/blob/master/docs/examples/posts.rst
this pulls right from the rss feed, just as the other answer. I dont know how performant this solution is vs the other one though, sorry.