Code Monkey home page Code Monkey logo

to_do_app_backend's Introduction

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.

to_do_app_backend's People

Contributors

dependabot[bot] avatar ducthang-vu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.