OnlineJudge/oj/local_settings.py

56 lines
1.1 KiB
Python
Raw Normal View History

# coding=utf-8
2015-08-02 00:50:38 +00:00
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
2017-05-08 12:37:54 +00:00
CACHES = {
"default": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/1",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
},
"JudgeQueue": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/2",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
},
"Throttling": {
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/3",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
2017-05-08 12:37:54 +00:00
}
}
2015-09-12 12:00:56 +00:00
REDIS_CACHE = {
2015-10-20 12:09:23 +00:00
"host": "127.0.0.1",
2015-09-12 12:00:56 +00:00
"port": 6379,
"db": 1
}
2015-12-07 11:15:28 +00:00
REDIS_QUEUE = {
"host": "127.0.0.1",
"port": 6379,
"db": 2
}
DEBUG = True
2017-01-24 08:11:46 +00:00
ALLOWED_HOSTS = ["*"]
2017-01-25 08:29:00 +00:00
TEST_CASE_DIR = "/tmp"
2017-04-18 17:37:10 +00:00
LOG_PATH = "log/"