|
10 | 10 | an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
11 | 11 | specific language governing permissions and limitations under the License. |
12 | 12 | """ |
13 | | -from corsheaders.defaults import default_headers |
| 13 | + |
| 14 | +import os |
14 | 15 | from blueapps.conf.log import get_logging_config_dict |
15 | 16 | from blueapps.conf.default_settings import * # noqa |
16 | 17 |
|
17 | 18 | BKPAAS_ENVIRONMENT = os.getenv("BKPAAS_ENVIRONMENT", "dev") |
18 | 19 |
|
19 | 20 | # 请在这里加入你的自定义 APP |
20 | | -INSTALLED_APPS += ( |
| 21 | +INSTALLED_APPS += ( # noqa |
21 | 22 | "rest_framework", |
22 | 23 | "drf_yasg", |
23 | 24 | "bk_plugin_framework.runtime.loghub", |
|
29 | 30 | ) |
30 | 31 |
|
31 | 32 | if BKPAAS_ENVIRONMENT == "dev": |
32 | | - INSTALLED_APPS += ("bk_plugin_framework.services.debug_panel",) |
| 33 | + INSTALLED_APPS += ("bk_plugin_framework.services.debug_panel",) # noqa |
33 | 34 |
|
34 | 35 | from bk_plugin_framework.runtime.schedule.celery import queues as schedule_queues # noqa |
35 | 36 | from bk_plugin_framework.runtime.callback.celery import queues as callback_queues # noqa |
|
61 | 62 | # ) |
62 | 63 |
|
63 | 64 | # 自定义中间件 |
64 | | -MIDDLEWARE += ( |
| 65 | +MIDDLEWARE += ( # noqa |
65 | 66 | "corsheaders.middleware.CorsMiddleware", |
66 | 67 | "bk_plugin_framework.services.bpf_service.middlewares.TraceIDInjectMiddleware", |
67 | 68 | "apigw_manager.apigw.authentication.ApiGatewayJWTGenericMiddleware", # JWT 认证 |
|
80 | 81 | # |
81 | 82 | STATIC_VERSION = "1.0" |
82 | 83 |
|
83 | | -STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] |
| 84 | +STATICFILES_DIRS = [os.path.join(BASE_DIR, "static")] # noqa |
84 | 85 |
|
85 | 86 | # CELERY 开关,使用时请改为 True,修改项目目录下的 Procfile 文件,添加以下两行命令: |
86 | 87 | # worker: python manage.py celery worker -l info |
|
113 | 114 | IS_AJAX_PLAIN_MODE = False |
114 | 115 |
|
115 | 116 | # 国际化配置 |
116 | | -LOCALE_PATHS = (os.path.join(BASE_DIR, "locale"),) |
| 117 | +LOCALE_PATHS = (os.path.join(BASE_DIR, "locale"),) # noqa |
117 | 118 |
|
118 | 119 | TIME_ZONE = "Asia/Shanghai" |
119 | 120 | LANGUAGE_CODE = "zh-hans" |
|
160 | 161 |
|
161 | 162 | ROOT_URLCONF = "bk_plugin_runtime.urls" |
162 | 163 |
|
163 | | -from blueapps.core.celery import celery_app |
164 | | -from bk_plugin_framework.runtime.schedule.celery.beat import SCHEDULE |
| 164 | +from blueapps.core.celery import celery_app # noqa |
| 165 | +from bk_plugin_framework.runtime.schedule.celery.beat import SCHEDULE # noqa |
165 | 166 |
|
166 | 167 | celery_app.conf.beat_schedule = SCHEDULE |
167 | 168 |
|
|
0 commit comments