2015-07-13 72 views
0

我想在我的Ubuntu 15.04上安裝djangoCMS。 首先我有一個「枕頭不能與JPEG編」的問題,但運行djangocms -f -p . myproject.Django CMS - AttributeError:'NoneType'對象沒有屬性'_meta'

Running migrations: 
     Rendering model states...Traceback (most recent call last): 
     File "./manage.py", line 10, in <module> 
     execute_from_command_line(sys.argv) 
     File "/home/user/.virtualenvs/folder/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line 
     utility.execute() 
     File "/home/user/.virtualenvs/folder/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute 
     self.fetch_command(subcommand).run_from_argv(self.argv) 
     File "/home/user/.virtualenvs/folder/local/lib/python2.7/site-packages/django/core/management/base.py", line 393, in run_from_argv 
     self.execute(*args, **cmd_options) 
     File "/home/user/.virtualenvs/folder/local/lib/python2.7/site-packages/django/core/management/base.py", line 444, in execute 
     output = self.handle(*args, **options) 
     File "/home/user/.virtualenvs/folder/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 221, in handle 
     executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial) 
     File "/home/user/.virtualenvs/folder/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 104, in migrate 
     state = migration.mutate_state(state, preserve=do_run) 
     File "/home/user/.virtualenvs/folder/local/lib/python2.7/site-packages/django/db/migrations/migration.py", line 83, in mutate_state 
     operation.state_forwards(self.app_label, new_state) 
     File "/home/user/.virtualenvs/folder/local/lib/python2.7/site-packages/django/db/migrations/operations/models.py", line 53, in state_forwards 
     list(self.managers), 
     File "/home/user/.virtualenvs/folder/local/lib/python2.7/site-packages/django/db/migrations/state.py", line 81, in add_model 
     self.reload_model(app_label, model_name) 
     File "/home/user/.virtualenvs/folder/local/lib/python2.7/site-packages/django/db/migrations/state.py", line 122, in reload_model 
     related_models.update(get_related_models_recursive(rel_model)) 
     File "/home/user/.virtualenvs/folder/local/lib/python2.7/site-packages/django/db/migrations/state.py", line 57, in get_related_models_recursive 
     rel_app_label, rel_model_name = rel_mod._meta.app_label, rel_mod._meta.model_name 
    AttributeError: 'NoneType' object has no attribute '_meta' 

誰能向我解釋爲什麼之前設法通過安裝其他版本畫中畫(PIP安裝枕頭== 2.3)來解決呢?以及如何解決它? 謝謝!

UPDATE:

我安裝的Django CMS的virtualenv中像這裏面:

pip install djangocms-installer 

PIP凍結:

cmsplugin-filer==0.10.1 
dj-database-url==0.3.0 
Django==1.8.3 
django-appconf==1.0.1 
django-classy-tags==0.6.2 
django-cms==3.1.2 
django-filer==0.9.11 
django-mptt==0.7.4 
django-polymorphic==0.7.1 
django-reversion==1.8.5 
django-sekizai==0.8.2 
Django-Select2==4.3.1 
django-treebeard==3.0 
djangocms-admin-style==0.2.7 
djangocms-column==1.5 
djangocms-flash==0.2.0 
djangocms-googlemap==0.2 
djangocms-inherit==0.1 
djangocms-installer==0.7.8 
djangocms-link==1.6.2 
djangocms-style==1.5 
djangocms-text-ckeditor==2.5.2 
easy-thumbnails==2.2 
html5lib==0.999999 
Pillow==2.3.0 
pytz==2015.4 
six==1.9.0 
tzlocal==1.2 
Unidecode==0.4.18 
wheel==0.24.0 
+0

似乎你的一個模型與另一個不存在的模型有關係,請檢查你的遷移 –

+0

你用什麼命令來安裝Django CMS本身?那麼'pip freeze'的輸出是什麼? –

+0

謝謝你的回答!我更新了帖子..我不明白其中一個模型與另一個不存在的模型有什麼關係,當這應該是django-cms的第一個乾淨安裝? – Troyer

回答

1

這個問題在支持解決/ 3.1.X分支django-cms。 您可以檢出它或等待下一個版本:3.1.3標籤。

+0

當我在Aldryne上運行我的項目時,如何實現django-cms的support/3.1.x分支? – Troyer

+0

你可以鏈接到有問題的提交嗎? –

+0

Troyer:如果你可以運行pip,你可以使用git repo來代替pip包。例如:pip安裝git + https://github.com/divio/[email protected]/3.1.x Janus:我沒有找到具體的提交,因爲我不知道究竟是什麼造成這種情況(這是圍繞CMSPlugin模型)。我目前在我們的「DjangoBootstrap」項目上運行了很多安裝和測試,並升級到3.1.x分支解決了這個問題。 – DylannCordel

相關問題