django 中文语言和时区设置问题

我的django的版是3.0.2 

按照网上大牛的办法设置了还是不行,先记录在此

#开头定义
from django.utils.translation import gettext_lazy as _
#LANGUAGES_CODE前添加 
LANGUAGES = [
    ('zh-Hans', _('Chinese')),
]

LANGUAGE_CODE = 'zh-Hans'

仍然报错

?: (translation.E001) You have provided an invalid value for the LANGUAGE_CODE setting: 'zh_Hans'.
?: (translation.E004) You have provided a value for the LANGUAGE_CODE setting that is not in the LANGUAGES setting.

 

上一篇:Vue入门篇:(二)使用idea工具开发Vue项目的配置过程


下一篇:(13) Idea工具的使用