Python/Django API for the BracketFun web application. This will serve the BracketFun web client. The README.md in that that repo is more interesting.
BracketFun-API uses Python 3.4
To install dependencies:
$ pip install -r requirements.txt
- Install Postgres
- Create user
bracket_appwith passwordbracket_pass - Create database
bracketfun DATABASE_URL=postgres://bracket_app:bracket_pass@localhost:5432/bracketfun- Use
./manage makemigrations tournamentand./manage migrateto create DB tables
To reset DB on Heroku (drops tables):
$ heroku pg:reset --app bracketfun-api DATABASE
To reset DB locally:
$ ./manaage.py flush
You should be able to run with ./manage.py runserver, but it is better to use Heroku locally, to
minimize differences between dev and production.
To run locally, install Heroku toolbelt, and use:
$ heroku local
To run tests:
$ ./manage.py test