Skip to content

therour/django-rest

Repository files navigation

Django CI

django-rest

Requirements

  • Python 3.8

Installation

  1. Setup virtual environment
  2. Install Python dependencies
# for production
pip install -r requirements-prod.txt

# for development & testing
pip install -r requirements.txt
  1. copy and configure env variables to match your setup
# using .env file
cp .env.example .env
  1. Run migration and load initial data
python manage.py migrate
python manage.py loaddata --app apps.geolocation geo_locations_id.json
  1. Run local server
python manage.py runserver
  1. (Production) Run server with gunicorn
python -m gunicorn mitraauto.asgi:application -k uvicorn.workers.UvicornWorker

Testing

  1. Run test
APP_ENV=testing manage.py test

# using Makefile
make test
  1. Run test with coverage
APP_ENV=testing coverage run manage.py test

# using Makefile
make coverage
  1. Generate coverage output as HTML
coverage html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages