gpt4 book ai didi

python - 知道为什么我会收到此错误吗?

转载 作者:行者123 更新时间:2023-12-04 18:55:44 26 4
gpt4 key购买 nike

我正在尝试在我的 ubuntu 电脑上安装 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
请求网址: http://localhost:8000/
Django 版本:1.3
异常类型:数据库错误
异常值:

没有这样的表: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

关于python - 知道为什么我会收到此错误吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5437768/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com