tarak / django-password-policies

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

Fixed url patterns which are removed in django 1.10 #61

Open azpwnz opened 7 years ago

azpwnz commented 7 years ago

There is import of django.conf.urls.patterns in https://github.com/tarak/django-password-policies/blob/master/password_policies/urls.py on line #1 that is deprecated from Django 1.8 and removed in Django 1.10 . Import of django.conf.urls.patterns causes "ImportError: cannot import name 'patterns'"

Django 1.10 release notes: https://docs.djangoproject.com/en/1.10/releases/1.10/#features-removed-in-1-10 django.conf.urls.patterns() is removed.

Django 1.10 use simple list for url patterns.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 78.822% when pulling f098e13ee07a6f01d144e6d6432cf9a42cc915a9 on zhukandrey:master into 4816664e6f2e6bbebd996aee2dc74a73412e0802 on tarak:master.

azpwnz commented 7 years ago

I've added a fix of incompatibility of get_form method in Django 1.10. Without fix, I gets the following error:

  File "/vagrant/project/password_policies/views.py", line 111, in get_context_data
    return super(PasswordChangeFormView, self).get_context_data(**kwargs)
  File "/home/vagrant/envs/vagrant/lib/python3.4/site-packages/django/views/generic/edit.py", line 93, in get_context_data
    kwargs['form'] = self.get_form()
TypeError: get_form() missing 1 required positional argument: 'form_class'
coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.1%) to 78.678% when pulling 8a854fe8ae767a158f4cb7380a891165b53cea25 on zhukandrey:master into 4816664e6f2e6bbebd996aee2dc74a73412e0802 on tarak:master.

ghost commented 7 years ago

Will this and #59 be merged soon?