mirror of https://gitee.com/anolis/sysom.git
refactor(config): Uniformly configure the time zone of Django projects
This commit is contained in:
parent
f77f23d180
commit
95e4f47051
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue