News website Python Project

News website python project using Django. In this python project, we will consume the rest API from to generate a Python project for students. This Python project will help our readers to understand how they can access rest API in the Django project and how easily they can develop their own web applications.

News website Python Project

Before we start let me explain what the Rest API is.

Rest stands for Representational state transfer is a software architectural style that defines a set of constraints to be used for creating Web services. Web services that conform to the REST architectural style, called RESTful Web services, provide interoperability between computer systems on the Internet.

RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. … REST technology is generally preferred to the more robust Simple Object Access Protocol (SOAP) technology because REST leverages less bandwidth, making it more suitable for internet usage.

news website using django basically scrap thousand of website all around the world and store the scrapped data in their database, generate API that you can consume in your favorite language.

Basic requirement to run our News website Django Project

1.  Install Django and required Packages

Since we are learning how to use any API from the web, we need two libraries to access this API requests and JSON along with Django. So, first of all, install it in your system using the following pip command

pip install requests

pip install JSON

pip install Django

alternatively, you can install all the required packages using following pip command

pip install –r requirement.txt

requirement.txt file is available with the source code of  News website project

2.  Get your own API from

In order to get our news data, right now we are scrapping websites for the latest news headlines instead of that we are basically grabbing information using RESTAPI. So if you use my project directly it means you are going to use my own API.

You are required to change the API key in the following code.

url = ('')

What you will learn from this New website Django Project

This news website is designed using RestAPI so along with using API inside Django, You will also learn the following

  • How to use Django Themeing systemDjango Project for Class 12 [ New Syllabus-2020]
  • How to use your own Django template Tags and break down your Django theme in small parts
  • How to use static data like stylesheets, JavaScript and Images inside Django

Live Demo of Django News website hosted on python anywhere. 

I hope you would love this simple Django new website Project for the student. If you want to purchase this project, please contact us at

Print Friendly, PDF & Email

Related Posts

If you like CBSEToaday and would like to contribute, you can also write an article using submit article or mail your article to See your article appearing on the main page and help other students/teachers.