Skip to content

kosmotive/tournaments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screenshots

Installation

Initial setup

Create virtual environment:

python -m venv venv

Activate virtual environment:

source venv/bin/activate

Install dependencies into virtual environment:

pip install -r requirements.txt

Prerequisites after initial setup

Activate virtual environment: (if not done yet)

source venv/bin/activate

Change into the tournaments directory:

cd tournaments

Reset the database

Caution

This is only required when migrations cannot be performed.

Reset database migrations:

rm db.sqlite3
rm -rf */migrations

Initialize the database

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

Day-to-day use

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