def get_context_data(self, **kwargs):
context = super(LoginSignupView, self).get_context_data(**kwargs)
context.update({
'signup_form': RegistrationForm(),
'message':''
})
return context
# def change_password(request):
# if request.method == 'POST':
# form = PasswordChangeForm(request.user, request.POST)
# if form.is_valid():
# user = form.save()
# update_session_auth_hash(request, user) # Important!
# messages.success(request, 'Your password was successfully updated!')
# return redirect('login:change_password')
# else:
# messages.error(request, 'Please correct the error below.')
# else:
# form = PasswordChangeForm(request.user)
# response = render(request, 'password_change.html', {
# 'form': form
# })
# response.set_cookie('password_changed', 'true')
# return response
评论列表
文章目录