Esempio n. 1
0
File: run.py Progetto: jk409/flask
def info():
    if 'username' not in session or session['username'] == '':
        return redirect(url_for('login'))
    else:
        username = session['username']
        passwd = session['password']
        dbs = pgo.pgo('127.0.0.1',27017,'kkk','view').run()
        #db_list = []
        #for db in dbs:
        #    db_list.append(db)
        return render_template('info.html',info_active="active",username=username,data=dbs)
Esempio n. 2
0
def info():
    if 'username' not in session or session['username'] == '':
        return redirect(url_for('login'))
    else:
        username = session['username']
        passwd = session['password']
        dbs = pgo.pgo('127.0.0.1', 27017, 'kkk', 'view').run()
        #db_list = []
        #for db in dbs:
        #    db_list.append(db)
        return render_template('info.html',
                               info_active="active",
                               username=username,
                               data=dbs)
Esempio n. 3
0
def user(username):
    na = pgo.pgo('127.0.0.1',27017,'kkk','user').find({"name": username})
    if na:
        return True
    else:
        return False
Esempio n. 4
0
def yz(db,table, zd, username):
    na = pgo.pgo('127.0.0.1', 27017, db, table).find({zd: username})
    if na or username == '':
        return True
    else:
        return False
Esempio n. 5
0
def user(username):
    na = pgo.pgo('127.0.0.1', 27017, 'kkk', 'user').find({"name": username})
    if na:
        return True
    else:
        return False
Esempio n. 6
0
def yz(db, table, zd, username):
    na = pgo.pgo('127.0.0.1', 27017, db, table).find({zd: username})
    if na or username == '':
        return True
    else:
        return False