Make RSS reader using python and django

Let’s make python RSS reader using Django backend framework. You can consider it a mini project idea for computer science and IT students

RSS stands for Real Simple Syndication or Rich Site Summary. Here we are going to make a simple RSS reader using python and django framework. Computer science or IT students can make a mini project on this.

What are we going to do exactly?

We are going to develop a python RSS reader in that we will create a web page interface that accepts external RSS URL and gives output on a web page in a very simple manner (RSS feed parser). The output will be headlines of the news, a small summary or description of that news, and a link to the specific news.

5 Best reference books for metallurgy

For RSS reader, we are going to use a powerful backend python framework – Django. In the frontend, we are going to use simple CDN bootstrapping.

I’m using VS code as a code edit for this tutorial. You are free to use any of your favorite code editors.

In case you need to host this project online then you can check the best hosting for India. It will help you to share your project with your friends or teachers.

Python RSS feed parser

Let’s create a folder and name it as a RSSReader (You can name it anything). Now open your code editor and open a created folder in the code editor. Create a virtual environment to keep project files isolated from your other computer files. For this, type the following command in the terminal:

python -m venv mysite

Now activate the virtual environment using the following command:


Let’s install django framework using the following command:

pip install django

Also, install the feedparser python library for parsing RSS feeds:

pip install feedparser

Now create a project in django with the name “rssreader”

django-admin startproject rssreader .

Create a new app with the name “rss” using:

python startapp rss

Go to the file and add app name ‘rss’  in the INSTALLED_APPS =[] as shown below:


Create a “templates” folder inside the rss folder like “rss/templates”. Again create a folder “rss” folder inside the templates folder. It should look like: “rss/templates/rss” . Now create reader.html and base.html files this rss folder.

In reader.html, type the following code:


{% extends ‘rss/base.html’ %}


{% block body %}
<br />
<form class=“form-inline”>
<div class=“form-group mx-sm-3 mb-2”>
<label for=“inputPassword2” class=“sr-only”>Password</label>
<input type=“text” class=“form-control” placeholder=“paste link”
<button type=“submit” class=“btn btn-primary mb-2”>Search</button>
{% if feed %}
<h2>{{ feed.feed.title }}</h2>
{% if feed.entries %}
{% for entry in feed.entries %}
<div class=“card”>
<div class=“card-header”>
<div class=“card-body”>
<h5 class=“card-title”>Headline: {{ entry.title }}</h5>
<p class=“card-text”>Description: {{ entry.description }}</p>
<a href=“{{ }}” class=“btn btn-primary”>Visit Link</a>
</div><p>{{ entry.published }}</p>


{% endfor %}
{% endif %}
{% else %}
<br />
<p>Enter your favorite RSS feed above.</p>
{% endif %}


{{ feed2 }}


{% endblock %}

In base.html type the following code:


<!DOCTYPE html>
<title>Django RSS Reader</title>
<nav class=“navbar navbar-expand-sm bg-dark navbar-dark”>
<ul class=“navbar-nav”>
<li class=“nav-item active”>
<a class=“nav-link” href=“/”>Home</a>
{% block body %}{% endblock %}

For cdn bootstrapping, add below lines before </head> in base.html

<script src=””></script>
<script src=””></script>
<script src=””></script>
<link rel=”stylesheet” href=””>
We are done with the template formatting. Now to go file in the rss app folder and type the following code in it. Remove all previous code.
from django.shortcuts import render
from django.http import HttpResponse
import feedparser
def index(request):
if request.GET.get(“url”):
url = request.GET[“url”] #Getting URL
feed = feedparser.parse(url) #Parsing XML data
feed = None
return render(request, ‘rss/reader.html’, {
‘feed’ : feed,
Now open file from main project folder “rssreader”. Its location should look like “rssreader/” . Remove all previous code from the file and type following code:
from django.contrib import admin
from django.urls import path, include


urlpatterns = [
path(, include(‘rss.urls’)),
Its time to create url route for your app. For this, create file in rss app folder. Its location should look like “rss/”. Type the following code in that file. Don’t forget to remove default code from the file.
from django.urls import path, include
from . import views


urlpatterns= [
path(, views.index, name=‘index’)
It’s time to run our RSS reader Django project in the browser. Type the following command in the terminal:
python runserver
After its successful execution in the terminal open any web browser and go to this address  Here you can see your RSS reader webpage.
For testing, type RSS feed url of  BBC news website in the search box
Now you can see live news feeds from the BBC website on your RSS reader webpage.
You can see the screenshot of  RSS reader webpage:
python rss reader using django
RSS reader using python and django
To host this project on hosting websites, check out hosting discount to get discount on hosting and save some money.
If you are facing any problem regarding python RSS reader then feel free to comment below. I will try my best to solve your problem

3 thoughts on “Make RSS reader using python and django”

Leave a Comment