Skip to content

Getting Started

Luís Melo edited this page Apr 22, 2018 · 1 revision

Setup

Install python 3.6

https://www.python.org/downloads/release/python-360/

Install all dependencies

pip install -r requirements.txt

Make Migrations & Migrate Database

python manage.py makemigrations prehab_app
python manage.py migrate prehab_app

Run the app

python manage.py runserver 0.0.0.0:8000

Go to: localhost:8000 to see your app!

Other commands

Lint all code according to PEP-8 standards

autopep8 ./ --recursive --in-place --pep8-passes 2000 --verbose --max-line-length 140

Run Unit Tests with coverage and generate coverage report in HTML (folder htmlcov)

coverage run manage.py test prehab_app
coverage html

Populate DB with initial data (only if needed)

python manage.py loaddata prehab/fixtures/*