Esempio n. 1
0
def db_status():
    try:
        db.query('SELECT 1')
        status = {'status': 'ok', 'message': 'Fine'}
    except:
        cls, e, tb = exc_info()
        message = 'DB Error: %s' % (e)
        status = {'status': 'error', 'message': message}
    return jsonify(status)
Esempio n. 2
0
File: user.py Progetto: lf8289/white
 def count(self):
     return db.query('SELECT COUNT(*) FROM ' + self.table)[0][0]
Esempio n. 3
0
 def count(self):
     return db.query('SELECT COUNT(*) FROM ' + self.table)[0][0]