@login_required
@mobile_template('users/{mobile/}pw_change.html')
def password_change(request, template):
 if (request.method == 'POST'):
  form = PasswordChangeForm(user=request.user, data=request.POST)
  if form.is_valid():
   form.save()
   return HttpResponseRedirect(reverse('users.pw_change_complete'))
 else:
  form = PasswordChangeForm(user=request.user)
 return render(request, template, {'form': form})

@ login_required @ mobile_template ( 'users/{mobile/}pw_change.html' ) def password_change ( request , template ) : if ( request . method == 'POST' ) : form = PasswordChangeForm ( user = request . user , data = request . POST ) if form . is_valid ( ) : form . save ( ) return HttpResponseRedirect ( reverse ( 'users.pw_change_complete' ) ) else : form = PasswordChangeForm ( user = request . user ) return render ( request , template , { 'form' : form } )
change password of user .