DEV Community

Sami Ullah Saleem
Sami Ullah Saleem

Posted on

Steps to create RestAPI with Django Rest Framework

1- Create a Project
2- Create an App
3- Create and file in your app
4- Create a model
5- Go to 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 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)