Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #36 solved #37

Merged
merged 1 commit into from
Aug 31, 2022
Merged

Conversation

memoriadecalculo
Copy link
Contributor

Error from the 17th line of views.py:
ImportError: cannot import name 'ugettext' from 'django.utils.translation'

The mentioned error appears when running python3.10 and Django4.0.

17th line of views.py:
from django.utils.translation import ugettext as _

As 'ugettext_lazy' has been deprecated for django 3+, it is possible to use 'gettext_lazy' instead without 'u'.

An 'if' was added to check the Django version and use the correct function preserving the compatibility for previous versions of django-docs.

@littlepea littlepea merged commit 85a8108 into littlepea:master Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants