码迷,mamicode.com
首页 > 其他好文 > 详细

(translation.E004) You have provided a value for the LANGUAGE_CODE setting that is not in the LANGUAGES setting.

时间:2019-12-14 13:30:08      阅读:428      评论:0      收藏:0      [点我收藏+]

标签:VID   from   style   text   lazy   chinese   django   provided   util   

     django3.0开始LANGUAGE_CODE前面必须配相应的LANGUAGES配置如下:

from django.utils.translation import gettext_lazy as _
LANGUAGES = [
    (zh-Hans, _(Chinese)),
]

LANGUAGE_CODE = zh-Hans

 

(translation.E004) You have provided a value for the LANGUAGE_CODE setting that is not in the LANGUAGES setting.

标签:VID   from   style   text   lazy   chinese   django   provided   util   

原文地址:https://www.cnblogs.com/dhcn/p/12038629.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!