django-advanced-todo

Test task for one of the companies. Django REST TODO on steroids with metrics and subtasks

MIT License

Stars
0

Django Advanced TODO

Test task for one of the companies. Django REST TODO on steroids with metrics and subtasks. Main goal is to todo simple TODO (REST API) with metrics (analytics) and also stuff like sub-tasks, completion and tracking

How to try project?

Project is being deployed to staging. You can try project here (Click!)

Methods?

TBD: Document annotations

  • POST /tokens/login (password, username)
  • POST /tokens/signup (password, username)
  • GET /tokens/info
  • GET|POST|DELETE|PATCH /tasks
  • GET /tasks/metrics

Authorization

Pass Authorization header as Token {YOUR_TOKEN_FROM_AUTH}

How to run?

Project uses Docker, to run use:

  • git clone https://github.com/kirillzhosul/django-advanced-todo.git
  • cd django-advanced-todo/src
  • cp .example.server.env .server.env
  • cp .example.database.env .database.env
  • cp .example.env .env
  • docker-compose up.
    This will run Docker, Database and server with Gunicorn!
    (Please notice to copy)

Static files?

Currently in staging, static files is being served by Ngninx (plus Django collectstatic) On the development, static files is avaliable when using django runserver (Used only for admin page for now)

Migrations?

Run docker exec -it django-advanced-todo-server-1 /bin/sh and then python manage.py makemigrations && python manage.py migrate this will trigger all database migrations!

How to configure?

You can modify environment variables inside /src/.server.env file that will be passed to the server with Docker. Example file can be copied from /src/.example.server.env

Technologies.

  • Python / Django (With DRF).
  • Gunicorn with Uvicorn workers (ASGI).
  • Docker / Docker-Compose
  • PostgreSQL / Django ORM
  • GitHub Workflows (CI/CD)
  • Nginx on the server side as the proxy server.
  • Mostly, Debian as the staging server

CI / CD.

  • CD: Removed
  • CI: Project have tests workflow, that will run Django tests / Test Docker when you are merging branch into main branch
    For now there is no special tests written for this project, so tests just not so useful.

Testing.

Run docker exec -it django-advanced-todo-1 /bin/sh and then python manage.py test this will trigger all tests!

References.

Badges
Extracted from project README
Tests Code style: black
Related Projects