tarak / django-password-policies

Django unicode-aware password policies.
Other
59 stars 92 forks source link

get_current_site() will no longer be importable from django.contrib.sites.models #50

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi with django 1.9, an error occured when setting-up the application.

File "XXX/lib/python3.5/site-packages/password_policies/urls.py", line 3, in from password_policies.views import PasswordChangeFormView File "XXX/lib/python3.5/site-packages/password_policies/views.py", line 19, in from password_policies.forms import PasswordPoliciesForm File "XXX/lib/python3.5/site-packages/password_policies/forms/init.py", line 8, in from django.contrib.sites.models import get_current_site ImportError: cannot import name 'get_current_site

In Django Deprecation Timeline https://docs.djangoproject.com/es/1.9/internals/deprecation/#deprecation-removed-in-1-9 there is the reason "RequestSite and get_current_site() will no longer be importable from django.contrib.sites.models."

Is it possibile to fix it with

try:
    from django.contrib.sites.models import get_current_site
except ImportError:
    from django.contrib.sites.shortcuts import get_current_site

, correct?

Thank you Pietro

brianmay commented 8 years ago

Django 1.9 was released December last year. Django 1.10 will be released in August. Any chance for a fix for this?

brianmay commented 8 years ago

Looks like this was fixed in #49 (November 2015) - the fact nobody has responded to this ticket or made a new release would suggest this project is dead.

tarak commented 8 years ago

Nope. Not dead. Just on a very much needed holiday. Will take care of things next week when I get home... On Jul 1, 2016 6:59 AM, "Brian May" notifications@github.com wrote:

Looks like this was fixed in #49 https://github.com/tarak/django-password-policies/pull/49 (November 2015) - the fact nobody has responded to this ticket or made a new release would suggest this project is dead.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tarak/django-password-policies/issues/50#issuecomment-229854100, or mute the thread https://github.com/notifications/unsubscribe/AADG1omYb4ClqfvTE5sMWSMwoitfxsWYks5qRJ6zgaJpZM4IrWhW .

andrijan commented 8 years ago

Any news on this reaching pypi?