大家好我将项目移动到服务器我现在尝试加载数据库
python manage.py loaddata resource/ddbb/20160817_db.json
甚至运行服务器,但我得到了这个错误。
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/mxp1217/django1101/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
utility.execute()
File "/home/mxp1217/django1101/lib/python2.7/site-packages/django/core/management/__init__.py", line 328, in execute
django.setup()
File "/home/mxp1217/django1101/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/mxp1217/django1101/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/home/mxp1217/django1101/lib/python2.7/site-packages/django/apps/config.py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/mxp1217/django1101/lib/python2.7/site-packages/cms/models/__init__.py", line 3, in <module>
from .pagemodel import * # nopyflakes
File "/home/mxp1217/django1101/lib/python2.7/site-packages/cms/models/pagemodel.py", line 1453, in <module>
_reversion()
File "/home/mxp1217/django1101/lib/python2.7/site-packages/cms/models/pagemodel.py", line 1449, in _reversion
exclude_fields=exclude_fields
File "/home/mxp1217/django1101/lib/python2.7/site-packages/cms/utils/helpers.py", line 135, in reversion_register
from cms.utils import reversion_hacks
File "/home/mxp1217/django1101/lib/python2.7/site-packages/cms/utils/reversion_hacks.py", line 18, in <module>
from reversion.models import Revision, Version, post_revision_commit # NOQA # nopyflakes
ImportError: cannot import name post_revision_commit
这是我在服务器上的环境中的安装
cmsplugin-filer==1.1.3
dj-database-url==0.4.1
Django==1.8.15
django-appconf==1.0.2
django-classy-tags==0.8.0
django-cms==3.4.1
django-filer==1.2.5
django-formtools==1.0
django-mptt==0.8.6
django-polymorphic==0.8.1
django-reversion==2.0.6
django-sekizai==0.10.0
Django-Select2==4.3.2
django-treebeard==4.0.1
djangocms-admin-style==1.2.5
djangocms-attributes-field==0.1.1
djangocms-column==1.7.0
djangocms-googlemap==0.5.2
djangocms-inherit==0.2.2
djangocms-installer==0.9.1
djangocms-link==2.0.1
djangocms-snippet==1.9.1
djangocms-style==1.7.0
djangocms-text-ckeditor==3.3.0
djangocms-video==2.0.2
djangorestframework==3.4.7
easy-thumbnails==2.3
feedparser==5.2.1
html5lib==0.9999999
MySQL-python==1.2.5
Pillow==3.4.1
pytz==2016.7
six==1.10.0
tzlocal==1.3
Unidecode==0.4.19
任何想法如何解决这个问题。
答案 0 :(得分:1)
您使用的\n
版本似乎不支持django-cms
2.0+。 django-cms source中的评论似乎肯定了这一点。我会尝试安装django-reversion
的最新1.x版本,看看它是否有效。
答案 1 :(得分:1)
你应该是最新的djnago-reversion
。因为post_revision_commit
信号已从2.0.0开始删除并添加回最新版本。 Reference