diff --git a/.gitignore b/.gitignore index 8bfbf25b..fcc1f04f 100755 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,8 @@ db.sqlite3 server/conf*.py server/conf.ini server/conf*.json +config/conf*.py +config/conf*.json sh/* temp/* nohup.out diff --git a/config/e.conf.py b/config/e.conf.py new file mode 100644 index 00000000..b6175ee6 --- /dev/null +++ b/config/e.conf.py @@ -0,0 +1,12 @@ +SECRET_KEY = 'xx' +DEBUG = False +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'xx', + 'USER': 'postgres', + 'PASSWORD': 'xx', + 'HOST': 'xx', + 'PORT': '5432', + } +} diff --git a/server/celery.py b/server/celery.py index 4081020e..96f71eef 100755 --- a/server/celery.py +++ b/server/celery.py @@ -1,5 +1,5 @@ import os -from . import conf +from config import conf from celery import Celery from celery.app.control import Control, Inspect diff --git a/server/settings.py b/server/settings.py index 4498d0be..cdfee897 100755 --- a/server/settings.py +++ b/server/settings.py @@ -14,7 +14,7 @@ from datetime import datetime, timedelta import os import json import sys -from .conf import * +from config.conf import * from django.core.cache import cache import logging @@ -369,7 +369,7 @@ LOGGING = { } ##### 加载客户可自定义配置并提供操作方法 ##### -SYS_JSON_PATH = os.path.join(BASE_DIR, 'server/conf.json') +SYS_JSON_PATH = os.path.join(BASE_DIR, 'config/conf.json') def get_sysconfig(key='', default='raise_error', reload=False): """获取系统配置可指定key字符串