mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2024-12-29 08:32:08 +00:00
b86ebf0ed7
支持图片上传
40 lines
728 B
Python
40 lines
728 B
Python
# coding=utf-8
|
|
import os
|
|
|
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
|
'HOST': '127.0.0.1',
|
|
'PORT': 5433,
|
|
'NAME': "onlinejudge",
|
|
'USER': "onlinejudge",
|
|
'PASSWORD': 'onlinejudge'
|
|
}
|
|
}
|
|
|
|
REDIS_CONF = {
|
|
"host": "127.0.0.1",
|
|
"port": "6379"
|
|
}
|
|
|
|
|
|
DEBUG = True
|
|
|
|
ALLOWED_HOSTS = ["*"]
|
|
|
|
TEST_CASE_DIR = "/tmp"
|
|
|
|
LOG_PATH = f"{BASE_DIR}/log/"
|
|
|
|
AVATAR_URI_PREFIX = "/static/avatar"
|
|
AVATAR_UPLOAD_DIR = f"{BASE_DIR}{AVATAR_URI_PREFIX}"
|
|
|
|
UPLOAD_PREFIX = "/static/upload"
|
|
UPLOAD_DIR = f"{BASE_DIR}{UPLOAD_PREFIX}"
|
|
|
|
STATICFILES_DIRS = [
|
|
os.path.join(BASE_DIR, "static"),
|
|
]
|