Closed abdelouahabb closed 12 years ago
hi here is the code:
class BaseHandler(tornado.web.RequestHandler): @tornado.web.removeslash def get_current_user(self): return self.get_secure_cookie("mechtari") @property def db(self): if not hasattr(BaseHandler,"_db"): _db = Database.connect("localhost:27017", "essog") return _db @property def fs(self): if not hasattr(BaseHandler,"_fs"): _fs = gridfs.GridFS(self.db) return _fs
class LoginHandler(BaseHandler): @tornado.web.asynchronous @tornado.gen.engine def post(self): email = self.get_argument("email") password = self.get_argument("pass1") dbmail = yield tornado.gen.Task(self.db.users.find, {"_id": email}) .... self.finish()
my browser then search for the response forever! am on windows 7 64bits and in other libraries it dont hang?
http://stackoverflow.com/questions/13351405/how-do-i-use-gridfs-with-libraries-that-dont-accept-non-blocking-gridfs/13365949#13365949
how much aproximatively will take to implement gridfs in mongotor?
hi here is the code:
class BaseHandler(tornado.web.RequestHandler): @tornado.web.removeslash def get_current_user(self): return self.get_secure_cookie("mechtari") @property def db(self): if not hasattr(BaseHandler,"_db"): _db = Database.connect("localhost:27017", "essog") return _db @property def fs(self): if not hasattr(BaseHandler,"_fs"): _fs = gridfs.GridFS(self.db) return _fs
class LoginHandler(BaseHandler): @tornado.web.asynchronous @tornado.gen.engine def post(self): email = self.get_argument("email") password = self.get_argument("pass1") dbmail = yield tornado.gen.Task(self.db.users.find, {"_id": email}) .... self.finish()
my browser then search for the response forever! am on windows 7 64bits and in other libraries it dont hang?