Skip to content

gregory912/eMenu-django

Repository files navigation

eMenu

Application written in Django to manage eMenu.

Features

  • user authorization made via JWT Token
  • data can be filtered by appropriate parameter setting
  • html/css templates have been added to the project, which will be sent in emails
  • every day at 10 am via celery periodic tasks a newsletter with the latest dishes will be sent to all users
  • Redis was used as a broker for Celery
  • WSGI server Gunicorn and reverse-proxy server Nginx were added to the project
  • Celery clusters can be displayed via Flower at the link http://127.0.0.1:5555/
  • the project uses Swagger to display end points
  • postgres database has been implemented

Prerequisites

Make sure you have the following installed on your computer:

  • Docker

Requirements

  • django = "4.1.6"
  • djangorestframework = "3.14.0"
  • djangorestframework-simplejwt = "5.2.2"
  • django-filter = "22.1"
  • pytest-django = "4.5.2"
  • pytest = "7.2.1"
  • redis = "4.5.1"
  • flower = "1.2.0"
  • celery = "5.2.7"
  • python-decouple = "3.7"
  • faker = "16.8.1"
  • psycopg2-binary = "2.9.5"
  • gunicorn = "20.1.0"
  • drf-spectacular = "0.25.1"
  • python-crontab = "2.7.1"
  • python-mock = "3.10.0"
  • django-celery-beat = "2.4.0"

Setup

Create and start containers

$ docker-compose up -d --build

Check the container logs

$ docker-compose logs -f

Check a container id

$ docker ps -a

Stop containers

$ docker-compose stop

Documentation

Documentation generated by Swagger

http://127.0.0.1:8000/api/schema/docs/

Postman Documentation

Documentation

Running Tests

To run tests, run the following command

$ docker exec -it <container_web_id> pytest

Check project test coverage

$ docker exec -it <container_web_id> pytest --cov