This question has been brought up before here: https://github.com/pennersr/django-allauth/issues/468
It's closed and is a few years old, which could explain why its not working for me. I am simply trying to redirect to a different page other than the change password page after the password is successfully changed.
Here is my code, which is not making the page redirect on success.
#ursl.py
url(r'accounts/password/change', views.custom_password_change),
url(r'^accounts/', include('allauth.urls'))
...
#views.py
from allauth.account.views import PasswordChangeView
from django.contrib.auth.decorators import login_required
class CustomPasswordChangeView(PasswordChangeView):
print("Getting Here")
@property
def success_url(self):
print('Inside Success')
return '/unknown/'
custom_password_change = login_required(CustomPasswordChangeView.as_view())
After submitting a password change, my terminal is printing "Getting Here" so it is definitely getting to that custom view. But its not printing "Inside Success".
Any help is appreciated! Thanks!