DEV Community

Sami Ullah Saleem
Sami Ullah Saleem

Posted on

Steps to create RestAPI with Django Rest Framework

Steps
1- Create a Project
2- Create an App
3- Create urls.py and Serializers.py file in your app
4- Create a model
5- Go to Serialzers.py file and create a class like TestSerializer(serliazer.ModelSerializer) and add model and fields values
6- Go to views file and create a class TestView(APIView) and create functions like get, post, put, and delete in it
7- Go to urls.py file and add path like path("/",TestView.as_view())
8- Create another path to delete an object like path("/",TestView.as_view())
Here you go, These are steps required to create restful api

Top comments (0)