From 4f40f28a8a0367159e0f7638fe641d8a12e3e954 Mon Sep 17 00:00:00 2001 From: virusdefender <1670873886@qq.com> Date: Sun, 2 Aug 2015 08:50:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=A1=B9=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qduoj/local_settings.py | 19 ++++++++++++++++++- qduoj/settings.py | 18 ++---------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/qduoj/local_settings.py b/qduoj/local_settings.py index 5e898d36..a99e0097 100644 --- a/qduoj/local_settings.py +++ b/qduoj/local_settings.py @@ -1,2 +1,19 @@ # coding=utf-8 -LOG_PATH = "LOG/" \ No newline at end of file +import os + +LOG_PATH = "LOG/" + +# Database +# https://docs.djangoproject.com/en/1.8/ref/settings/#databases +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'), + 'CONN_MAX_AGE': 1, + } +} + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True \ No newline at end of file diff --git a/qduoj/settings.py b/qduoj/settings.py index cffb0175..52eaac62 100644 --- a/qduoj/settings.py +++ b/qduoj/settings.py @@ -31,8 +31,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'hzfp^8mbgapc&x%$#xv)0=t8s7_ilingw(q3!@h&2fty6v6fxz' -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True + ALLOWED_HOSTS = [] @@ -49,7 +48,6 @@ INSTALLED_APPS = ( 'account', - 'rest_framework', 'rest_framework_swagger', ) @@ -86,18 +84,6 @@ TEMPLATES = [ WSGI_APPLICATION = 'qduoj.wsgi.application' -# Database -# https://docs.djangoproject.com/en/1.8/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - 'CONN_MAX_AGE': 1, - } -} - - # Internationalization # https://docs.djangoproject.com/en/1.8/topics/i18n/ @@ -117,7 +103,7 @@ USE_TZ = True STATIC_URL = '/static/' -STATICFILES_DIRS = (os.path.join(BASE_DIR, "static/src/"),) +STATICFILES_DIRS = (os.path.join(BASE_DIR, "static/release/"),) TEMPLATE_DIRS = ( os.path.join(BASE_DIR, "template"),