2015-02-06 85 views
-2

django新手...由於一個月我試圖按照this教程沒有成功。當我syncdb我得到以下錯誤:django inplaceedit測試項目

(virt-inplaceedit)Mac:testing manuelstrasser$ python manage.py syncdb 
Traceback (most recent call last): 
    File "manage.py", line 10, in <module> 
    execute_from_command_line(sys.argv) 
    File "/Users/manuelstrasser/Desktop/inplace/virt-inplaceedit/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line 
    utility.execute() 
    File "/Users/manuelstrasser/Desktop/inplace/virt-inplaceedit/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute 
    django.setup() 
    File "/Users/manuelstrasser/Desktop/inplace/virt-inplaceedit/lib/python2.7/site-packages/django/__init__.py", line 21, in setup 
    apps.populate(settings.INSTALLED_APPS) 
    File "/Users/manuelstrasser/Desktop/inplace/virt-inplaceedit/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate 
    app_config = AppConfig.create(entry) 
    File "/Users/manuelstrasser/Desktop/inplace/virt-inplaceedit/lib/python2.7/site-packages/django/apps/config.py", line 123, in create 
    import_module(entry) 
    File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module 
    __import__(name) 
    File "/Users/manuelstrasser/Desktop/inplace/virt-inplaceedit/lib/python2.7/site-packages/sorl/thumbnail/__init__.py", line 1, in <module> 
    from sorl.thumbnail.fields import ImageField 
    File "/Users/manuelstrasser/Desktop/inplace/virt-inplaceedit/lib/python2.7/site-packages/sorl/thumbnail/fields.py", line 6, in <module> 
    from sorl.thumbnail import default 
    File "/Users/manuelstrasser/Desktop/inplace/virt-inplaceedit/lib/python2.7/site-packages/sorl/thumbnail/default.py", line 3, in <module> 
    from sorl.thumbnail.helpers import get_module_class 
    File "/Users/manuelstrasser/Desktop/inplace/virt-inplaceedit/lib/python2.7/site-packages/sorl/thumbnail/helpers.py", line 5, in <module> 
    from django.utils import simplejson 
ImportError: cannot import name simplejson 

我安裝了simplejson,但仍然是相同的錯誤。任何有此教程的經驗?我完全按照說明做了所有事情......

回答

0

django.utils.simplejson已在django 1.7中棄用。

看起來像你使用老版本的sorl-thumbnailCurrent versionsorl-thumbnail支持django 1.7,所以嘗試更新這個庫。

+0

非常感謝你,一切工作完美與django 1.6這是很好的測試 – Lepus 2015-02-06 12:17:44

+0

現在可以與Django 1.7和Django 1.8一起工作 – Goin 2015-09-01 15:31:27