Create virtual environment:
python -m venv venv
Activate virtual environment:
source venv/bin/activate
Install dependencies into virtual environment:
pip install -r requirements.txt
Activate virtual environment: (if not done yet)
source venv/bin/activate
Change into the tournaments
directory:
cd tournaments
This is only required after the initial setup, or when updating to new versions:
-
Create/update the database:
python manage.py migrate
-
Create a superuser: (only after the initial setup)
python manage.py createsuperuser
Run tests:
python manage.py test
Compute test coverage:
coverage run --source='.' manage.py test
coverage html
This assumes that coverage.py was installed (e.g., pip install coverage
).
Run the local server:
python manage.py runserver