1

我正在努力解决这个错误。曾经有一个名为 Member 的模型,但我现在删除了对它的所有引用,删除并重新制作了数据库——我搜索了项目,但根本没有找到对“Member”的引用!这是一个全新的项目,所以没有太多内容(我可以重新开始,但我需要知道发生了什么)。

请帮忙,谢谢!

ImportError at /admin
cannot import name Member
Request Method: GET
Request URL:    http://localhost:8000/admin
Django Version: 1.4
Exception Type: ImportError
Exception Value:    
cannot import name Member
Exception Location:     

    /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-   packages/django/utils/importlib.py in import_module, line 35
    Python Executable:  /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Python Version: 2.7.2
Python Path:    
['/Users/methuselah/code/django/ss',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django_extensions-0.8-py2.7.egg',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages',
 '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PIL']
Server time:    Wed, 16 May 2012 13:13:47 +0100
4

1 回答 1

1

您可以清除 .pyc 文件,这是数据的编译版本,也可以重新启动 python 应用程序服务器,它应该为您重新编译所有内容。

于 2012-05-16T12:39:25.917 回答