示例#1
0
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="")
示例#2
0
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='')
示例#3
0
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)
示例#4
0
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)
示例#5
0
def index():
    rand_doc = handler.get_rand()
    bottle.redirect("/doc/%s/" % rand_doc)
示例#6
0
def index():
    rand_doc = handler.get_rand()
    bottle.redirect('/doc/%s/' % rand_doc)