增加数据 from .models import Goods from app.extensions import db goods1 = Goods(name='魅族18s', price=3400, cate_id=4) goods2 = Goods(name='华为P40', price=5200, cate_id=4) goods3 = Goods(name='OPPO Note3', price=2759, cate_id=4) db.session.add(goods1) # 添加一…