MobileBlur

0_helpers.py at [b2d6f6e2e9]
Login

0_helpers.py at [b2d6f6e2e9]

File applications/mobileblur/models/0_helpers.py artifact 8ed26c507d part of check-in b2d6f6e2e9


newsblur = local_import("newsblur")
newsblur = newsblur.NewsBlur()

threshold = 0
thresholds = ["nt", "ps", "ng"]  # indices -1, 0, 1 for negative, neutral, and positive intelligence filters

if [request.application, request.controller, request.function] != [request.application, "default", "login"]:
    if "nb_cookie" not in request.cookies.keys():
        redirect(URL("default", "login"))
    else:
        newsblur.cookies["newsblur_sessionid"] = request.cookies["nb_cookie"].value