python - Flask做的网站怎么实现分类?
PHPz
PHPz 2017-04-18 10:04:13
0
2
657
PHPz
PHPz

学习是最好的投资!

reply all(2)
PHPzhong
tags = db.Table('tags',
                db.Column('tag_id', db.INTEGER, db.ForeignKey('tag.id', ondelete='CASCADE')),
                db.Column('thread_id', db.INTEGER, db.ForeignKey('article.id', ondelete='CASCADE'))
                )

# TAG Many to Many
class Tag(db.Model):
    __tablename__ = 'tag'

    id = db.Column(db.INTEGER, autoincrement=True, primary_key=True)
    name = db.Column(db.VARCHAR(30))
迷茫

It has been deployed and it is just like this. There is still a little problem in modifying the classification when editing

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template