1
messense 2014-06-24 17:48:45 +08:00
|
3
shajiquan 2014-07-25 14:26:41 +08:00
class News(Base):
category_id = Column(Integer, ForeignKey('news_category .category_id')) category = relationship("news_category") ... news = db_session.query(News).filter_by(id=5).first() 分类名字: news.category.category_name |
4
shajiquan 2014-07-25 14:27:02 +08:00
呃,我的缩进呢……
|