摘要:
分页显示及排序查询语句如下:pag = News.query.filter().order_by(News.create_time.desc()).paginate(page, per_page, False)相关解释说明:# filter()查询新闻News类中的所... 阅读全文
摘要:
一对多class Role(db.Model): """角色表""" __tablename__ = 'roles' id = db.Column(db.Integer, primary_key=True) name = db.Column(d... 阅读全文
摘要:
模型类class Author(db.Model): __tablename__ = 't_author' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String... 阅读全文