mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-09 02:42:47 +00:00
Fix settings loading bug
This commit is contained in:
15
settings.py
15
settings.py
@@ -212,6 +212,13 @@ SEAHUB_TITLE = 'SeaHub'
|
||||
USE_SUBDOMAIN = False
|
||||
ACCOUNT_TYPE = 'personal'
|
||||
|
||||
try:
|
||||
from local_settings import SECRET_KEY
|
||||
except ImportError:
|
||||
SETTINGS_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
from secret_key_generator import generate_secret_key
|
||||
generate_secret_key(os.path.join(SETTINGS_DIR, 'local_settings.py'))
|
||||
|
||||
try:
|
||||
import local_settings
|
||||
except ImportError:
|
||||
@@ -235,11 +242,3 @@ else:
|
||||
LOGIN_URL = SITE_ROOT + 'accounts/login'
|
||||
|
||||
SEAFILE_VERSION = '0.9.4'
|
||||
|
||||
try:
|
||||
from local_settings import SECRET_KEY
|
||||
except ImportError:
|
||||
SETTINGS_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
from secret_key_generator import generate_secret_key
|
||||
generate_secret_key(os.path.join(SETTINGS_DIR, 'local_settings.py'))
|
||||
from local_settings import SECRET_KEY
|
||||
|
Reference in New Issue
Block a user