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
Caution
This is only required when migrations cannot be performed.
Reset database migrations:
rm db.sqlite3
rm -rf */migrations
Tip
This is only required after initial setup, after resetting the database, or when updating to new versions.
Create migrations:
python manage.py makemigrations tournaments
Create/update database:
python manage.py migrate
Create a superuser:
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