def get_test(): for users in Users.select().where(Users.banned == 0): print users.id
def models_test(): #for user in User.select(): # print user.key #print User.get_one(User.key == 'sx2767722_10') u = Users.get_one(Users.username == 'kakou') print u.password
def create_table(): Users.create_table(True) Recglist.create_table(True)
from car_recg import app, Users from car_recg import debug_logging, online_logging, RecgServer, MyIni if __name__ == '__main__': Users.create_table(True) debug_logging('log\carrecgser.log') rs = RecgServer() rs.main() ini = MyIni() sysini = ini.get_sys_conf() app.config['THREADS'] = sysini['threads'] app.config['MAXSIZE'] = sysini['threads'] * 16 app.run(host='0.0.0.0', port=sysini['port'], threaded=True) del rs del ini