1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Added migration

This commit is contained in:
Retspen 2015-03-25 11:36:37 +02:00
parent 5ccc813336
commit 1f68e8c5ed
7 changed files with 71 additions and 40 deletions

View file

@ -31,6 +31,8 @@ def profile(request):
oldpasswd = request.POST.get('oldpasswd', '')
password1 = request.POST.get('passwd1', '')
password2 = request.POST.get('passwd2', '')
if not password1 or not password2:
error_messages.append("Passwords didn't enter")
if password1 and password2 and password1 != password2:
error_messages.append("Passwords don't match")
if not user.check_password(oldpasswd):
@ -74,7 +76,7 @@ def accounts(request):
user_id = request.POST.get('user_id', '')
user_pass = request.POST.get('user_pass', '')
user_edit = User.objects.get(id=user_id)
user.password = user_pass
user_edit.set_password(user_pass)
user_edit.save()
return HttpResponseRedirect(request.get_full_path())
if 'block' in request.POST: