Byrokracie Sklené 2023
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

99 lines
3.5 KiB

from pathlib import Path
# Build paths inside the project like this: BASE_DIR / "subdir".
BASE_DIR = Path(__file__).resolve().parent.parent
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = "django-insecure-opcz6rfrp-osm7wnd@3_5yb56^4=!@7@-(38j^!6^ej%88r2ud"
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
# ALLOWED_HOSTS = ['192.168.137.1' ]
WSGI_APPLICATION = 'byrokracie.wsgi.application'
STATIC_ROOT = 'static/'
STATIC_URL = 'static/'
# Jednotlivé části djanga
INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"byrokracie",
"autentizace",
"hra",
]
MIDDLEWARE = [
"django.middleware.security.SecurityMiddleware",
"django.contrib.sessions.middleware.SessionMiddleware",
"django.middleware.common.CommonMiddleware",
"django.middleware.csrf.CsrfViewMiddleware",
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'byrokracie.context_processor.add_settings'
],
},
},
]
# Databáze
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# Lokalizace
LANGUAGE_CODE = 'cs'
TIME_ZONE = 'Europe/Prague'
USE_L10N = True # S přechodem k djangu>=4 lze smazat (localized formatting)
USE_TZ = True # S přechodem k djangu>=5 lze smazat (timezone aware datetimes)
# URL pro přihlášení (default je account/login)
LOGIN_URL = 'login'
LOGIN_REDIRECT_URL = '/hra/'
# Konstantny
NAZEV: str = "Vyšetřování ztráty třídní knihy"
NEJVYSSI_INDEX: int = 6
PRVNI_PONDELI: int = 2
PRVNI_NOV: int = 13
TIMEOUT_STANOVISTE: int = 60 # v sekundách
TYM_AUTO_RELOAD: int = 30 # v sekundách
TIME_SPEED: float = 1.0 # 1 = hodina za minutu
DEN: tuple[float, float] = (8.0, 18.0)
POCET_BANANU: int = 2
POSTOVNA_DEN_V_TYDNU = 3
STASTNA_CISLA: set[int] = {1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97, 100, 103, 109, 129, 130, 133, 139, 167, 176, 188, 190, 192, 193, 203, 208, 219, 226, 230, 236, 239, 262, 263, 280, 291, 293, 301, 302, 310, 313, 319, 320, 326, 329, 331, 338, 356, 362, 365, 367, 368, 376, 379, 383, 386, 391, 392, 397, 404, 409, 440, 446, 464, 469, 478, 487, 490, 496, 536, 556, 563, 565, 566, 608, 617, 622, 623, 632, 635, 637, 638, 644, 649, 653, 655, 656, 665, 671, 673, 680, 683, 694, 700, 709, 716, 736, 739, 748, 761, 763, 784, 790, 793, 802, 806, 818, 820, 833, 836, 847, 860, 863, 874, 881, 888, 899, 901, 904, 907, 910, 912, 913, 921, 923, 931, 932, 937, 940, 946, 964, 970, 973, 989, 998, 1000}
# nejasno = [1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0]
# [nejasno[i] * (random.choice(list(range(3))) + 1) for i in range(len(nejasno))]
POCASI: list[int] = [3, 1, 3, 2, 2, 2, 0, 3, 2, 1, 0, 2, 1, 0, 3, 2, 3, 0, 2, 3, 3, 1, 2, 0]
# Django musí mít nastaveno Autofield
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# A musí mít nastavené počáteční urls
ROOT_URLCONF = 'byrokracie.urls'