19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
Field("password", "password", requires=IS_NOT_EMPTY())
)
if login_form.accepts(request):
try:
results = newsblur.login(login_form.vars["username"], login_form.vars["password"])
response.cookies["nb_cookie"] = newsblur.cookies["newsblur_sessionid"]
response.cookies["nb_cookie"]["path"] = "/"
print "cookie =", newsblur.cookies
redirect(URL("index"))
except Exception as ex:
login_form.insert(-1, ex.message)
return dict(login_form=login_form)
|
<
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
Field("password", "password", requires=IS_NOT_EMPTY())
)
if login_form.accepts(request):
try:
results = newsblur.login(login_form.vars["username"], login_form.vars["password"])
response.cookies["nb_cookie"] = newsblur.cookies["newsblur_sessionid"]
response.cookies["nb_cookie"]["path"] = "/"
redirect(URL("index"))
except Exception as ex:
login_form.insert(-1, ex.message)
return dict(login_form=login_form)
|