コード例 #1
0
ファイル: views.py プロジェクト: hj5730/mysite01
def update(request):
    no = request.session['authuser']['no']
    name = request.POST['name']
    password = request.POST['password']
    gender = request.POST['gender']

    models.update(no, name, password, gender)
    request.session['authuser'] = {'no': no, 'name': name}

    return HttpResponseRedirect('/user/updateform')
コード例 #2
0
def update(request):
    name = request.POST['name']
    password = request.POST['password']
    gender = request.POST['gender']
    no = request.session['authuser']['no']

    userModels.update(name, password, gender, no)
    request.session['authuser'] = {'no': no, 'name': name}

    return HttpResponseRedirect('/main')
コード例 #3
0
ファイル: views.py プロジェクト: yoonchaiyoung/mysite
def update(request):
    no = request.session['authuser']['no']
    name = request.POST['name']
    email = request.POST['email']
    password = request.POST['password']
    gender = request.POST['gender']

    usermodels.update(name, email, password, gender, no)

    result = usermodels.fetchone(email, password)
    request.session['authuser']['name'] = name

    return render(request, 'user/update.html')
コード例 #4
0
ファイル: views.py プロジェクト: Heez27/mysite
def update(request):
    no = request.session['authuser']['no']
    name = request.POST['name']
    password = request.POST['password']
    gender = request.POST['gender']

    if request.POST['password'] is not '':
        password = request.POST['password']
        models.update(no, name, password, gender)
        request.session['authuser'] = {'no': no, 'name': name}
        return HttpResponseRedirect('/user/updateform?result=success')
    else:
        return HttpResponseRedirect('/user/updateform?result=fail')
コード例 #5
0
def update(request):
    del request.session['temp']

    # if request.POST['password'] is not '':
    #     password = request.POST['password']

    authuser = request.session['authuser']
    no = authuser['no']
    name = request.POST['name']
    password = request.POST['password']
    gender = request.POST['gender']

    models.update(name, password, gender, no)

    request.session['authuser']['name'] = name

    return HttpResponseRedirect('/user/updatesuccess')
コード例 #6
0
def test_usermodels_update():
    result = usermodels.update('감자깡2', '*****@*****.**', '1234', 'male', 9)