A backend for Notes-Web-App using Django and Django-REST-Framework
- To build the container run
docker-compose build
- To create migration files
docker-compose run --rm backend sh -c "python3 manage.py makemigrations"
- To migrate the db models
docker-compose run --rm backend sh -c "python3 manage.py migrate"
- To run the application locally
docker-compose up
POST /api/user/create
Parameter | Type | Description |
---|---|---|
email |
string |
Required. Your email |
password |
string |
Required. Your password |
name |
string |
Required. Your name |
POST /api/user/token
Parameter | Type | Description |
---|---|---|
email |
string |
Required. Your email |
password |
string |
Required. Your password |
GET /api/note/get
Headers -> Authorization: Token
POST /api/note/create
Headers -> Authorization: Token
Parameter | Type | Description |
---|---|---|
title |
string |
Required. Note Title |
body |
string |
Required. Note Body |
user |
string |
Required. User ID |
GET /api/note/get/<str:pk>
Headers -> Authorization: Token
PUT /api/note/update/<str:pk>
Headers -> Authorization: Token
Parameter | Type | Description |
---|---|---|
title |
string |
Required. Note Title |
body |
string |
Required. Note Body |
user |
string |
Required. User ID |
DELETE /api/note/delete/<str:pk>
Headers -> Authorization: Token