VOOZH about

URL: https://www.geeksforgeeks.org/projects/how-to-create-a-new-project-in-django-using-firebase-database/

⇱ How to create a new project in Django using Firebase Database? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to create a new project in Django using Firebase Database?

Last Updated : 23 Jul, 2025

Django is a Python-based web framework that allows you to quickly create efficient web applications. If you are new to Django then you can refer to Django Introduction and Installation. Here we are going to learn How to create a Django project using Firebase as Database . 

How to create a new project in Firebase ?

Step 1: Firstly, We are going to Create a project on Firebase to connect our static web page. Visit Firebase Page For Configuring Your Project - https://accounts.google.com/v3/signin/identifier?continue=https%3A%2F%2Fconsole.firebase.google.com%2Fu%2F0%2F%3Fpli%3D1&followup=https%3A%2F%2Fconsole.firebase.google.com%2Fu%2F0%2F%3Fpli%3D1&ifkv=AdBytiPUyACWEV61Cgyh-P11gJytqwuH7XuMwpopdwyQzXTxDZrH9w0IDilaUGB-2EUp82iGDx62lA&osid=1&passive=1209600&flowName=WebLiteSignIn&flowEntry=ServiceLogin&dsh=S1862608153%3A1753258092808562

Click On Add Project Button.

👁 Image

Step 2: Give a Name To your Project and Click On Continue Button.

👁 Image

 Step 3: Now Click On Continue Button.

👁 Image

Step 4: Now Choose Default Account For Firebase and Click On Create Project.

👁 Image

Step 5: Now Your Project is created. You are Good to Go. Click on Continue .

👁 Image

Step 6:  Now Click On 3rd icon that's Web Button(</>).

👁 Image

Step 7: Give a nickname  to your Web Project and Click On Register App

👁 Image

Step 8: Now you will see the configuration of your App like this. Copy this Code somewhere .You will need it later.

👁 Image

Step 9 : Click On The Realtime Database button As Shown In Figure. 

👁 Image

Step 10: Now Click On Create Database.

👁 Image

Step 11: Now Click On Test Mode and then Click On Enable.

👁 Image

Now, We will Add Some Data and will try to Retrieve that using our Website

👁 Image

Integrating Firebase Database to Django Project - 

Now, I hope that you have already create a project in Django. If not then Refer to How to Create a Basic Project using MVT in Django ? Since we are using firebase as Database , We need to install pyrebase . For this Type the following Command in terminal

$pip install pyrebase4

Create a views.py file in your project directly. The Structure should be like this .

👁 Image

Urls.py file

Views.py

 
 

Home.html

Now move to your project directory and run our project using the given command :

python manage.py runserver

Project Output will be as Follow - 

👁 Image
Comment