Posts

Showing posts from December, 2023

REST API with Django rest framework with React as front-end and postgresql as backend - 2

Image
Hello and welcome back!! In part 1, I created the database table, the model in django, serialized it, described a viewset and set up my routers. Lastly, I used postman to check if the API works fine. This is part 2 of my attempt to show the college exam schedules from my postgreSQL database onto my react front-end via Django REST API framework. I will now proceed to share Step 2 of the process where I create the React App and integrate it with the framework. Step 2 - The React App I have not used the standard create react app because I will be integrating react in the django app. Instead, I will be using django to create another app within the same project, and will be using the django template features which will act as our front-end.  Traversy's video helped me understand how to do this.   1. In the terminal of my backendproject folder, I create the app called frontend.      prompt> manage.py startapp frontend      This will create a frontend...

REST API with Django rest framework with React as front-end and postgresql as backend - 1

Image
 Hi All, Welcome to my journey in building a data services based web app. I am working on a react based website to provide information on competitive examinations to be held in India by various seat allocation boards for professional engineering colleges in India. My tech stack includes React frontend, with PostgreSQL as the backend, and I am going to use django framework for the API Services. This blog is to share with you how I did it. Some references I used are: Here is a good starter video from Traversy Media   - This video is a little old, but it meets the purpose,  and the  django framework API Guides. I have imported schedule data from a csv into my database table.  I plan to fetch the schedule data from the database and show it on the react front-end using API services I created using django rest framework. I created a project called backendproject. For the purpose of the blog, I will call this the project folder, and an app within it with the name ...