我在这里有点疯狂。我不断收到此错误:ImportError:没有模块命名模型,我不知道为什么。以下是我迄今发现...ImportError:没有模块命名模型
>>> from django.shortcuts import get_object_or_404, redirect
>>> from mystore.cart import cart
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Users/Jeff/django/mystore/cart/cart.py", line 3, in <module>
from mystore.cart.models import CartItem
ImportError: No module named models
>>>
我不知道这是怎么回事这... ...在cart.py 3号线是这样的:
from mystore.cart.models import CartItem
如果我尝试做:从mystore.cart.models进口CartItem它工作正常...
有什么建议吗?
我有我的应用程序全无组织,谢谢chrissdpatt – JeffC