Build simple ToDo web application using django-rest framework and javascript frontend using CRUD functionality.
pip install djangopip install djangorestframeworkpython manage.py startproject project_namepython manage.py startapp api- Add newely created app(api) to INSTALLED_APPS
INSTALLED_APPS = [
.....
'api',
....
'frontend',
]
- create
searializers.pyfile and create serializers for models - create api views in
views.pyusing CRUD and add urls to/api/path - create frontend
python manage.py startapp frontend - create template for frontend and add frontend code
- finally create database and runserver
python manage.py makemigrations
python manage.py migrate
python manage.py runserver