任何想法,为什么我得到这个错误?
我正试图在我的ubuntu pc上安装django-cms。 我得到这个错误:
Traceback (most recent call last):
File "manage.py", line 14, in <module>
execute_manager(settings)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 209, in execute
translation.activate('en-us')
File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/__init__.py", line 100, in activate
return _trans.activate(language)
File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/trans_real.py", line 202, in activate
_active.value = translation(language)
File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/trans_real.py", line 185, in translation
default_translation = _fetch(settings.LANGUAGE_CODE)
File "/usr/local/lib/python2.6/dist-packages/django/utils/translation/trans_real.py", line 162, in _fetch
app = import_module(appname)
File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/usr/local/lib/python2.6/dist-packages/cms/__init__.py", line 14, in <module>
patch_settings()
File "/usr/local/lib/python2.6/dist-packages/cms/conf/__init__.py", line 32, in patch_settings
post_patch()
File "/usr/local/lib/python2.6/dist-packages/cms/conf/patch.py", line 26, in post_patch
settings.CMS_TEMPLATES = tuple(settings.CMS_TEMPLATES) + (
TypeError: 'NoneType' object is not iterable
任何想法为什么会出现这个错误?
谢谢编辑-1 - 嗨,你们是对的,我没有把cms_templates放在settings.py中。 我现在做了,但现在我得到这个错误。
DatabaseError at /
没有这样的表格:cms_page
请求方法:GET请求URL:http:// localhost:8000 / Django版本:1.3异常类型:DatabaseError异常值:
没有这样的表格:cms_page
异常位置:/usr/local/lib/python2.6/dist-packages/django/db/backends/sqlite3/base.py执行中,第234行Python可执行文件:/ usr / bin / python Python版本:2.6.6 Python路径:
['/ home / naveen / django_projects / myproject','/usr/local/lib/python2.6/dist-packages/pip-0.8.3-py2.6.egg','/usr/lib/python2.6 ','/usr/lib/python2.6/plat-linux2','/usr/lib/python2.6/lib-tk','/usr/lib/python2.6/lib-old','/ usr /lib/python2.6/lib-dynload','/usr/local/lib/python2.6/dist-packages','/usr/lib/python2.6/dist-packages','/ usr / lib / python2.6 / dist-packages / PIL','/usr/lib/python2.6/dist-packages/gst-0.10','/usr/lib/pymodules/python2.6','/ usr / lib / python2 .6 / dist-packages / gtk-2.0','/usr/lib/pymodules/python2.6/gtk-2.0']
服务器时间:星期五,2011年3月25日15:34:04 -0500
它正在寻找一个settings.CMS_TEMPLATES
。 它试图使None
成为抛出该错误的元组。
确保你有一个CMS_TEMPLATES
定义。
http://docs.django-cms.org/en/2.1.3/getting_started/tutorial.html#configuration-and-setup
您的CMS_TEMPLATES设置为无,我不知道那是什么,但我猜测它是您需要在某处配置的设置。
settings.CMS_TEMPLATES
是None
,我相信。 如果没有问题的代码示例很难说。