Ejemplo n.º 1
0
def login(request):
    email = request.POST["email"]
    password = request.POST["password"]

    result = models.findby_email_and_password(email, password)
    if result is None:
        return HttpResponseRedirect('/user/loginform?result=fail')

    # login 처리
    request.session["authuser"] = result

    return HttpResponseRedirect('/')
Ejemplo n.º 2
0
def test_models_findby_email_and_password():
    result = models.findby_email_and_password('*****@*****.**', '1234')
    print(result)