【发布时间】:2022-01-25 04:48:12
【问题描述】:
所以我将我的 python 代码更新为 Django 4.0,因此,我不得不删除并更新一些已弃用的代码,如“ungettext_lazy”和类似的。
在本地,代码编译良好,但是当我将其推送到 heroku 时,出现此错误:
from django.utils.translation import ungettext_lazy
ImportError: cannot import name 'ungettext_lazy' from 'django.utils.translation' (/app/.heroku/python/lib/python3.9/site-packages/django/utils/translation/__init__.py)
我尝试了一些方法,但无法在 heroku 上更新。
【问题讨论】:
标签: python django heroku release