django-rest-framework icon indicating copy to clipboard operation
django-rest-framework copied to clipboard

from django.utils.translation import ugettext_lazy as _

Open mitulparmar7161 opened this issue 1 year ago • 4 comments

from django.utils.translation import ugettext_lazy as _

getting this error while using any routes of rest framework

mitulparmar7161 avatar Jan 18 '24 07:01 mitulparmar7161

How do you suggest this issue be fixed?

Ayatade avatar Jan 21 '24 21:01 Ayatade

How do you suggest this issue be fixed? from django.utils.translation import ugettext_lazy as _

ugettext_lazy as _ is now changed to gettext_lazy as _ in django-4 i use "rest-auth-dj4" to fix this error and its working fine for me but now django-5 is relesed so that "rest-auth-dj4" is not working on this version (django5)

mitulparmar7161 avatar Feb 14 '24 04:02 mitulparmar7161

@mitulparmar7161 Which version of DRF you are using? Without any additional packages, this problem shouldn't exist in the latest version. If you have the latest DRF and Python, but still getting that error with rest-auth-dj4, it seems like the problem is in that package.

I tried to check the dependencies of that, thinking it's a package but it doesn't exist on PyPI.

ulgens avatar Feb 14 '24 08:02 ulgens

@ulgens

I was using latest version of Django == 5.0.2 and DRF = 3.14.1 but was still encountering an error due to Django's latest version, when i downgrade Django version to 4.2.1 it started working for me

mitulparmar7161 avatar Feb 15 '24 06:02 mitulparmar7161

i think it is not a DRF issue

auvipy avatar Feb 20 '24 19:02 auvipy