model.py 543 B

12345678910111213141516171819
  1. from peewee import *
  2. from playhouse.pool import PooledMySQLDatabase
  3. database = PooledMySQLDatabase('yixue',
  4. user='yixue',
  5. password='Lai123',
  6. host='test.db.cxhy.cn',
  7. port=3306,
  8. max_connections=32,
  9. stale_timeout=300, )
  10. class UnknownField(object):
  11. def __init__(self, *_, **__): pass
  12. class BaseModel(Model):
  13. class Meta:
  14. database = database