Fix password change views
This commit is contained in:
parent
9a10e3cd35
commit
ca25e62e35
|
@ -34,6 +34,7 @@ class GASLoginView(LoginView):
|
|||
class GASPasswordChangeView(GASMixin, PasswordChangeView):
|
||||
template_name = 'gas/base_form.html'
|
||||
success_url = reverse_lazy('gas:index')
|
||||
continue_url = reverse_lazy('gas:change_password')
|
||||
title = _('Change your password')
|
||||
success_message = _('Password changed.')
|
||||
|
||||
|
|
|
@ -75,6 +75,9 @@ class ChangePasswordUser(BaseMixin, gviews.GASMixin, FormView):
|
|||
def get_title(self):
|
||||
return _('Change {username} user password').format(username=self.user.username)
|
||||
|
||||
def get_continue_url(self):
|
||||
return reverse('gas:user_change_password', args=(self.kwargs['pk'],))
|
||||
|
||||
def get_form_kwargs(self):
|
||||
kwargs = super().get_form_kwargs()
|
||||
kwargs['user'] = self.user
|
||||
|
|
Loading…
Reference in New Issue