解决ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation’
Published on Aug. 22, 2023, 12:11 p.m.
django4.0出现如下错误
from django.utils.translation import ugettext_lazy as _
ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation'
需要将 ugettext_lazy 更改为 gettext_lazy