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.
标签:中文,CODE,zh,LANGUAGE,django,setting,Hans,translation,时区 来源: https://www.cnblogs.com/spidernyp/p/12257555.html