ImportError at /admin/
cannot import name formats
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/
Exception Type: ImportError
Exception Value:
cannot import name formats
Exception Location: /usr/lib/python2.6/site-packages/django/contrib/admin/util.py in <module>, line 3
Python Executable: /usr/bin/python
Python Version: 2.6.0
Python Path: ['/home/cad/project/lkd/gezegen/lkd_gezegen', '/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/Numeric', '/usr/lib64/python2.6/site-packages/PIL', '/usr/lib64/python2.6/site-packages/gst-0.10', '/usr/lib64/python2.6/site-packages/gtk-2.0', '/usr/lib64/python2.6/site-packages/wx-2.8-gtk2-unicode', '/usr/lib/python2.6/site-packages']
答案 0 :(得分:1)
该行尝试做什么(请参阅the sources)
3 from django.utils import formats
如果您的django/
上没有sys.path
目录的父目录,或者某个级别的__init__.py
文件以某种方式丢失,那么这可以解释您的问题。< / p>
在旁注中,.0
中的2.6.0
令人担忧 - 这是一个带有已知错误的旧微观释放。你能升级到目前的2.6.4
吗?我不认为这与您观察到的问题有关,但坚持使用旧的微型微量释放可能会在将来给您带来其他问题。