2015-06-26 07:59:53 +00:00
|
|
|
# coding=utf-8
|
2015-08-02 00:50:38 +00:00
|
|
|
import os
|
2022-05-08 09:13:22 +00:00
|
|
|
from utils.shortcuts import get_env
|
2015-08-02 00:50:38 +00:00
|
|
|
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
|
|
|
|
DATABASES = {
|
|
|
|
'default': {
|
2017-10-06 09:46:14 +00:00
|
|
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
2022-05-08 09:13:22 +00:00
|
|
|
'HOST': get_env('POSTGRES_HOST', '127.0.0.1'),
|
|
|
|
'PORT': get_env('POSTGRES_PORT', '5435'),
|
|
|
|
'NAME': get_env('POSTGRES_DB', 'onlinejudge'),
|
|
|
|
'USER': get_env('POSTGRES_USER', 'onlinejudge'),
|
|
|
|
'PASSWORD': get_env('POSTGRES_PASSWORD', 'onlinejudge')
|
2015-08-02 00:50:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-23 02:47:26 +00:00
|
|
|
REDIS_CONF = {
|
2022-05-08 09:13:22 +00:00
|
|
|
'host': get_env('REDIS_HOST', '127.0.0.1'),
|
|
|
|
'port': get_env('REDIS_PORT', '6380')
|
2015-12-07 11:15:28 +00:00
|
|
|
}
|
2015-11-29 13:29:26 +00:00
|
|
|
|
2017-10-23 02:47:26 +00:00
|
|
|
|
2015-08-12 06:01:34 +00:00
|
|
|
DEBUG = True
|
|
|
|
|
2017-01-24 08:11:46 +00:00
|
|
|
ALLOWED_HOSTS = ["*"]
|
2015-09-11 12:34:15 +00:00
|
|
|
|
2017-11-24 19:37:40 +00:00
|
|
|
DATA_DIR = f"{BASE_DIR}/data"
|