From b973dfdfda540adad78ea8465c2886f7e602012f Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Thu, 10 Dec 2015 19:29:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=86=99=E6=B3=95=EF=BC=9B=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=90=8D=E4=B9=9F=E5=9C=A8=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E4=B8=AD=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oj/local_settings.py | 2 +- oj/server_settings.py | 5 ++--- oj/settings.py | 6 +----- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/oj/local_settings.py b/oj/local_settings.py index 82bfe2ed..794a7b63 100644 --- a/oj/local_settings.py +++ b/oj/local_settings.py @@ -39,4 +39,4 @@ STATICFILES_DIRS = [os.path.join(BASE_DIR, "static/src/"), BASE_DIR] # 模板文件夹 TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'template/src/')] -SSO = {"callback": "http://localhost:8765/login"} \ No newline at end of file +SSO = {"callback": "http://localhost:8765/login"} diff --git a/oj/server_settings.py b/oj/server_settings.py index cd86c16f..afec6d19 100644 --- a/oj/server_settings.py +++ b/oj/server_settings.py @@ -11,7 +11,7 @@ DATABASES = { 'CONN_MAX_AGE': 0.1, 'HOST': os.environ.get("MYSQL_PORT_3306_TCP_ADDR", "127.0.0.1"), 'PORT': 3306, - 'USER': 'root', + 'USER': os.environ.get("MYSQL_ENV_MYSQL_USER", "root"), 'PASSWORD': os.environ.get("MYSQL_ENV_MYSQL_ROOT_PASSWORD", "root") }, 'submission': { @@ -20,7 +20,7 @@ DATABASES = { 'CONN_MAX_AGE': 0.1, 'HOST': os.environ.get("MYSQL_PORT_3306_TCP_ADDR", "127.0.0.1"), 'PORT': 3306, - 'USER': 'root', + 'USER': os.environ.get("MYSQL_ENV_MYSQL_USER", "root"), 'PASSWORD': os.environ.get("MYSQL_ENV_MYSQL_ROOT_PASSWORD", "root") } } @@ -37,7 +37,6 @@ REDIS_QUEUE = { "db": 2 } - DEBUG = False ALLOWED_HOSTS = ['*'] diff --git a/oj/settings.py b/oj/settings.py index ac766975..f5857033 100644 --- a/oj/settings.py +++ b/oj/settings.py @@ -22,7 +22,6 @@ if ENV == "local": elif ENV == "server": from .server_settings import * - BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) @@ -187,19 +186,16 @@ WEBSITE_INFO = {"website_name": "qduoj", "website_footer": u"青岛大学信息工程学院 创新实验室 京ICP备15062075号-1", "url": "https://qduoj.com"} - HUEY = { 'backend': 'huey.backends.redis_backend', 'name': 'task_queue', 'connection': {'host': REDIS_QUEUE["host"], 'port': REDIS_QUEUE["port"], 'db': REDIS_QUEUE["db"]}, - 'always_eager': False, # Defaults to False when running via manage.py run_huey + 'always_eager': False, # Defaults to False when running via manage.py run_huey # Options to pass into the consumer when running ``manage.py run_huey`` 'consumer_options': {'workers': 50}, } - SMTP_CONFIG = {"smtp_server": "smtp.mxhichina.com", "email": "noreply@qduoj.com", "password": os.environ.get("smtp_password", "111111"), "tls": False} -