def show(doc): password = models.get("password:%s" % doc) if password: return template("pass", doc=doc) user = handler.get_rand() now = time.time() return template("test", user=user, timestamp=now, doc=doc, password="")
def show(doc): password = models.get('password:%s' % doc) if password: return template('pass', doc=doc) user = handler.get_rand() now = time.time() return template('test', user=user, timestamp=now, doc=doc, password='')
def pass_show(passw, doc): password = models.get("password:%s" % doc) if not password: password = "" if password != passw: return "error" user = handler.get_rand() now = time.time() return template("test", user=user, timestamp=now, doc=doc, password=passw)
def pass_show(passw, doc): password = models.get('password:%s' % doc) if not password: password = '' if password != passw: return 'error' user = handler.get_rand() now = time.time() return template('test', user=user, timestamp=now, doc=doc, password=passw)
def index(): rand_doc = handler.get_rand() bottle.redirect("/doc/%s/" % rand_doc)
def index(): rand_doc = handler.get_rand() bottle.redirect('/doc/%s/' % rand_doc)