aboutsummaryrefslogtreecommitdiff
path: root/app/config.py
blob: 2a85d744096bd4efd34f44be5f1e4c3f4e4b14b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from os import environ
from os.path import abspath, dirname, join


class Config:
    SQLALCHEMY_DATABASE_URI = environ.get("DATABASE_URL") or "sqlite:///" + join(abspath(dirname(__file__)), "app.db")
    COURT_COUNT = 12
    PLAYERS_PER_COURT = 4
    MIN_PLAYER_LEVEL = 1
    MAX_PLAYER_LEVEL = 10
    # Default players as dictionary of first names and primary keys
    DEFAULTS = {"---": 1, "RESERVED": 2}
    GUEST_COUNT = 4
    # Guest players as dictionary of first names and play level
    GUESTS = {"Beginner": 1, "Novice": 3, "Intermediate": 5}