refactor(config): Uniformly configure the time zone of Django projects

This commit is contained in:
SunnyQjm 2023-04-17 11:15:24 +08:00
parent f77f23d180
commit 95e4f47051
7 changed files with 7 additions and 7 deletions

View File

@ -2,6 +2,7 @@
sysom_global:
path:
root_path: &global_root_path /usr/local/sysom
timezone: "Asia/Shanghai"
# Unified configuration of Server
sysom_server:
@ -43,7 +44,6 @@ sysom_server:
# Host
SYSOM_CEC_API_HOST_TOPIC: SYSOM_CEC_API_HOST_TOPIC
special_param:
comm:
cec_default_max_len: 1000

View File

@ -101,7 +101,7 @@ ASGI_APPLICATION = 'sysom.asgi.application'
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
TIME_ZONE = YAML_CONFIG.get_global_config().timezone
USE_I18N = True
USE_L10N = True
USE_TZ = True

View File

@ -100,7 +100,7 @@ ASGI_APPLICATION = 'sysom_diagnosis.asgi.application'
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
TIME_ZONE = YAML_CONFIG.get_global_config().timezone
USE_I18N = True
USE_L10N = True
USE_TZ = True

View File

@ -72,7 +72,7 @@ ASGI_APPLICATION = 'sysom_hotfix.asgi.application'
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
TIME_ZONE = YAML_CONFIG.get_global_config().timezone
USE_I18N = True
USE_L10N = True
USE_TZ = True

View File

@ -100,7 +100,7 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
TIME_ZONE = YAML_CONFIG.get_global_config().timezone
USE_I18N = True

View File

@ -108,7 +108,7 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
TIME_ZONE = YAML_CONFIG.get_global_config().timezone
USE_I18N = True

View File

@ -99,7 +99,7 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE = 'zh-hans'
TIME_ZONE = 'Asia/Shanghai'
TIME_ZONE = YAML_CONFIG.get_global_config().timezone
USE_I18N = True