http://opensource.org/licenses/MIT Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ from __future__ import absolute_import import importlib import os import config from blueapps.conf import get_settings_from_module locals().update(get_settings_from_module(config)) BASE_DIR = locals()['BASE_DIR'] RUN_VER = locals()['RUN_VER'] if 'BK_URL' not in locals().keys(): BK_URL = None # 根据平台加载对应变量 try: site_mod = importlib.import_module('blueapps.conf.sites.%s' % RUN_VER) except ImportError: raise ImportError(u'unknown RUN_VER: %s' % RUN_VER) for _setting in dir(site_mod): if _setting.isupper(): locals()[_setting] = getattr(site_mod, _setting)
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://opensource.org/licenses/MIT Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ import os from config import default from blueapps.conf import get_settings_from_module from blueapps.patch.log import get_paas_v2_logging_config_dict locals().update(get_settings_from_module(default)) BK_URL = locals()['BK_URL'] APP_CODE = locals()['APP_CODE'] SECRET_KEY = locals()['SECRET_KEY'] MIDDLEWARE = locals()['MIDDLEWARE'] INSTALLED_APPS = locals()['INSTALLED_APPS'] STATIC_URL = locals()['STATIC_URL'] # IS_LOCAL,V2和V3的判断方式不同,V2用BK_ENV IS_LOCAL = not os.getenv('BK_ENV', False) # ESB component ESB_SDK_NAME = 'blueking.component' # 蓝鲸PASS平台URL
You may obtain a copy of the License at http://opensource.org/licenses/MIT Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ from __future__ import absolute_import import os import re from blueapps.conf import environ, get_settings_from_module from blueapps.conf.database import get_default_database_config_dict locals().update(get_settings_from_module(environ)) BASE_DIR = locals()['BASE_DIR'] APP_CODE = locals()['APP_CODE'] ROOT_URLCONF = 'urls' SITE_ID = 1 INSTALLED_APPS = ( 'bkoauth', # 框架自定义命令 'blueapps.contrib.bk_commands', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes',