Build simple ToDo web application using django-rest framework and javascript frontend using CRUD functionality.
pip install django
pip install djangorestframework
python manage.py startproject project_name
python manage.py startapp api
- Add newely created app(api) to INSTALLED_APPS
INSTALLED_APPS = [
.....
'api',
....
'frontend',
]
- create
searializers.py
file and create serializers for models - create api views in
views.py
using 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