1
2
3
4
5
6
7
8
9
|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
-
-
-
-
+
+
+
+
+
+
+
+
|
newsblur = local_import("newsblur")
threshold = 0
thresholds = ["nt", "ps", "ng"] # indices -1, 0, 1 for negative, neutral, and positive intelligence filters
def login(username="spiffytech"):
user = db(db.users.username==username).select().first()
if user["cookie"] is None:
results = newsblur.login(user["username"], user["password"])
#import ipdb
#ipdb.set_trace()
print request.env.path_info
if "nb_cookie" not in request.cookies.keys():
if [request.application, request.controller, request.function] != [request.application, "default", "login"]:
redirect(URL("default", "login", vars=dict(redirect=request.folder)))
#else:
# newsblur.cookies = request.cookies["nb_cookie"]
|