I've put all the files in sequence in the branches while I'm learning to use django as backend framework.
- Created django project using command
django-admin startproject learning
- Created first api view, or we also call it api response
- Create app name
api
via commandpython manage.py startapp api
- return json response from url
http://localhost:8000/home/
- Sending Json data from client side to server and handling it.
- More like we send
body
in aPOST
request orQueryParams
- Adding data like
headers
andcontent_type
- Create a separate app
products
- Make a model/object class in
models.py
- Migrate the models for DB
This will actually let's the django knows there's a new model to look for now:
python manage.py makemigration
python manage.py migrate
- import
model_to_dict
- Used
@api_view()
for DRF - Stuff like restricting methods
GET
,POST
etc.