Skip to content

teddybear/coins-test-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:[email protected]: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

About

Test django coins project with DRF

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages