编辑manage.py,添加测试帖子 @manager.command def create_test_post(): for x in range(1, 100): title = '标题{}'.format(x) content = '内容:{}'.format(x) board = BoardModel.query.first() author = FrontUser.query.first() post = PostModel(title=title, content=content)…