默认 · 6月 20, 2022 0

解决ImportError: cannot import name ‘ugettext_lazy’ from ‘django.utils.translation’

内容纲要

django4.0出现如下错误

from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation'

需要将 ugettext_lazy 更改为 gettext_lazy

https://github.com/asyncee/django-easy-select2/issues/87

%d 博主赞过: