Skip to content

ducthang-vu/to_do_app_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

to_do_app_backend

to_do_app_backend is a Django application which implements a basic API for a to-do app.

This project is still in development.

Minimum requirements

This application is based on Django framework.

python==3.8.1

asgiref==3.2.10
Django==3.1.1
django-seed==0.2.2
djangorestframework==3.11.1
djangorestframework-simplejwt==4.4.0
Faker==4.1.3
mysqlclient==2.0.1
PyJWT==1.7.1
python-dateutil==2.8.1
pytz==2020.1
six==1.15.0
sqlparse==0.3.1
text-unidecode==1.3

Usage

Open terminal and install the necessary packages by running:

pip install -r requirements.txt

Then start the server by running:

python manage.py runserver

For running the tests, do:

python manage.py test

Go to to_do_app_backend/settings.py and use your own values for SECRET_KEY and DATABASE.

Features

The application works with two resources: users (id, username, first_name, email, password, tasks) and tasks (id, title, description, priority, completed).

Use the endpoint POST /users (parameters: username, first_name, email, password) to create a new user.

Use the endpoint POST /api/token/ (parameters: username, password) to get both the JWT token and the refresh token. The JWT token expire after 5 minutes.

Use the endpoint POST /api/token/refresh/ with the refresh token to get a new JWT token.

Use the endpoint POST /api/tasks (header: Authorization: Bearer <JWT token>) to create a new task. Use the endpoint GET|PUT|DELETE /api/tasks/<id>/ (header: Authorization: Bearer <JWT token>) to perform CRUD actions (retrieve, update, delete) on tasks. Use the endpoint GET /api/tasks (header: Authorization: Bearer <JWT token>) to get the list of all user's tasks.

Use the endpoint GET|PUT|DELETE api/users/<id>/ (header: Authorization: Bearer <JWT token>) to perform CRUD actions (retrieve, update, delete) on user; user's first_name filed cannot be updated.

About

to_do_app_backend is a Django application which implements a basic API for a to-do app.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy