Pull WordPress feed into Django template

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

Read More

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.

Related posts

Leave a Reply

2 comments

  1. 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

    1. Hit the WordPress Feed URL in view.py
    2. Parse the resulting XML nodes (or feedparser I think)
    3. Extract needed data
    4. Send data to your django template from the view