How and why to Integrate Django and react

Ishan Tiwari
2 min readMay 1, 2021

Django is superpowerful web devlopment framework which powers many websites like Instagram, Youtube, Dropbox and even more . While it is enough to create a super smooth user friendly website but it isn’t the only framework used in these websites.

The reason behind that is django can be used with html, css and js along with it’s template langauage to create the ui and also handle models at the same time but the ui we see in these websites is very clean elegant and beautiful or in other words not hadled by html, css, js alone. There is some other power behind it and that is frontend frameworks like react, angular, vuejs, etc.

The problem now is that you want to use django’s built in user authentication and models and also want that data to be displayed in the frontend. How will you do that. Now django rest framework comes to the rescue.

django rest framework

Django rest framework converts the python objects to json and creates paths specific paths so that you can access them. So, the only thing to left to do is to make api calls in the frontend to access that data and display that in the frontend to the user.

The complete architechture

--

--

Ishan Tiwari

A Linux enthusiast working on small scale django and react projects