请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

插入数据的时候报错

sqlalchemy.exc.InvalidRequestError: Multiple classes found for path "Movie" in the registry of this declarative base. Please use a fully module-qualified path.

https://img1.sycdn.imooc.com/szimg//59b2645b0001963b18621558.jpg

正在回答

3回答

同学,你好,你在什么位置插入数据的时候出错,给老师一个截图。

0 回复 有任何疑惑可以回复我~
  • 提问者 欲影 #1
    老师实在admin中插入的~~截图已贴出
    回复 有任何疑惑可以回复我~ 2017-09-12 09:34:26
  • 提问者 欲影 #2
    老师,已经四天没进展了,能回答一下这个问题么?
    回复 有任何疑惑可以回复我~ 2017-09-13 16:55:18
  • rustgopy 回复 提问者 欲影 #3
    同学,你好,你在导入头的时候是通过from app import db导入的吗?你给我一个models.py完整的代码。
    回复 有任何疑惑可以回复我~ 2017-09-14 15:27:44
rustgopy 2017-09-14 15:36:20

注释掉蓝图部分,待导入成功再消除注释。

"""
from app.home import home as home_blueprint
from app.admin import admin as admin_blueprint

app.register_blueprint(home_blueprint)
app.register_blueprint(admin_blueprint, url_prefix="/admin")


@app.errorhandler(404)
def page_not_found(error):
   return render_template("home/404.html"), 404
"""

0 回复 有任何疑惑可以回复我~
提问者 欲影 2017-09-11 17:11:35

https://img1.sycdn.imooc.com/szimg//59b6532f0001b85a18161042.jpg

插入数据

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信