CuriousLearner / django-phone-verify

A Django app to support phone number verification using security code / One-Time-Password (OTP) sent via SMS.
https://www.sanyamkhurana.com/django-phone-verify/
GNU General Public License v3.0
258 stars 61 forks source link

Update "ugettext_lazy" Import in Package Models #80

Closed Nish8192 closed 1 year ago

Nish8192 commented 1 year ago

When installing django-phone-verify with a new Django application, the following error is encountered when running the python manage.py migrate command to create the django-phone-verify tables in the database:

/site-packages/phone_verify/models.py", line 6, in <module> from django.utils.translation import ugettext_lazy as _ ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation'

There is a pull request (https://github.com/CuriousLearner/django-phone-verify/pull/71) open to address this but it doesn't look like it's been deployed. The models.py and serializers.py that were installed with version 2.0.1 did not have the changes from that pull request included causing the error above.

CuriousLearner commented 1 year ago

I think this was added in https://github.com/CuriousLearner/django-phone-verify/commit/b407b60c918c189678ce85a19bc70352b591afa0

But I'll have a look on what's happening.

Nish8192 commented 1 year ago

Yes, I believe a change was made to address this issue but possibly has not been deployed. When installing the latest version of django-phone-verify (2.0.1), the update to the models.py and serializers.py was not included.

CuriousLearner commented 1 year ago

Yes, please use python -m pip install -e /path/to/local/django-phone-verify to install the local dev version :)

rcwestlake commented 1 year ago

@CuriousLearner thanks for working on this. Is it possible to get this deployed?

CuriousLearner commented 1 year ago

Let me try to spend some time this week to update this package and possibly make a new release. No promises though.

rcwestlake commented 1 year ago

Thanks @CuriousLearner. That would be awesome.

CuriousLearner commented 1 year ago

Hey @rcwestlake 👋🏼

I just released v3.0.0 and it is available on PyPI: https://pypi.org/project/django-phone-verify/3.0.0/

It supports Django 4.x

rcwestlake commented 1 year ago

@CuriousLearner thank you thank you! I will do that this or next week.