Skip to content

Latest commit

 

History

History
55 lines (51 loc) · 1.02 KB

README.md

File metadata and controls

55 lines (51 loc) · 1.02 KB

Test project

Overview

Web service for transferring coins between accounts

Requirements

  • Python 3.6

Install

  1. Create virtual environment
python -m venv .venv
  1. Activate created environment
source .venv/bin/activate
  1. Install pip requirements
pip install -r requirements.txt
  1. Create and modify environment-related settings (database, secret_key, etc)
export DATABASE_URL=psql://user:password@127.0.0.1:5432/database
export SECRET_KEY=verysecret
  1. Run database migrations
python manage.py migrate
  1. Collect static
python manage.py collectstatic
  1. Run tests
python manage.py test
  1. Run linter (in project directory)
flake8

You'll need to create users and their accounts before using API

python manage.py createsuperuser
python manage.py runserver

Proceed to http://127.0.0.1:8000/admin with superuser's credentials to add them

API DOCS

Run local server

python manage.py runserver

Swagger Docs available from browser http://127.0.0.1:8000/docs