Esempio n. 1
0
 def __before__(self):
     print "[dobtrack log] __before__() of DobitemController() called"
     self.item_q = Session.query(Item)
     session.requestcount = 0
     if "user" not in session:
         print "'user' not in session"
         session["path_before_login"] = request.url
         session.save()
         return redirect("/login")
Esempio n. 2
0
 def doesrepexist(self, id):
     # Return "yes" if id exists
     if Session.query(Item.rep).filter_by(rep=id).first():
         return "yes"
     else:
         return ""