Professional Documents
Culture Documents
Sec Pragati Chauhan17feb
Sec Pragati Chauhan17feb
CLASSWORK 17/02/2024
STEPS TO BE FOLLOWED FOR CREATION OF API USING DJANGO REST FRAMEWORK are as follows –
Step 1 –
Step 2 –
cd proj
Step 3-
Step 5-
Step 6-
In rest_apis_app/models.py
Step 7 –
Step 8 –
In rest_apis_app/views.py
Step 9 –
In rest_apis_app/urls.py
Step 10 –
OUTPUT :
CUSTOM VIEWS GET AND POST METHODS
1. POST
OUTPUT:
2. GET
OUTPUT:
Create the superuser so that we can access the Django admin dashboard
python manage.py createsuperuser
OUTPUT: