例如这两个modelclass A(Model):
id = Column(Integer, primary_key=True)
b = relationship('B', backref='a')
class B(Model):
id = Column(Integer, primary_key = True)
a_id = Column(Interger, ForeignKey = "A.id")class aAdmin(ModelView):
column_list = ('id', 'b.id')admin.add_view(aAdmin(A, db.session))
添加回答
举报
0/150
提交
取消