Django 1.7 conflicting models

无人久伴 提交于 2019-11-28 10:44:13
Wangolo Joel

Instead of importing the all project then the app then the module inside the app just import the app which is inside the project then the module.

Instead of

from webproject.app import model

Use

from app import model

or

from app.models import Staffs

I think this bug report (turns out it's a feature) is related to your problem.

For me the problem was resolved by importing from resume.models only, rather than apps.resume.models. So search for "from apps." in your project and replace it.

(For me, removing __init__.py or changing the PYTHONPATH caused other problems, I imagine that's common.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!