Django CMS 3在启动时非常配置

时间:2014-05-08 16:52:18

标签: django django-cms

我希望在看到一个漂亮的演示之后尝试新的Django CMS 3。我在这里开始了快速入门:

https://github.com/divio/django-cms-tutorial/blob/master/Step%201%20-%20Initial%20Setup.md

在运行这些步骤并启动开发服务器之后,我在浏览器中获得的第一个输出是:

ImproperlyConfigured at /
Module "cms.context_processors" does not define a "cms_settings" attribute/class

以下是完整的追溯。也许有人可以指出我正确的方向来解决这个问题?

环境:

Request Method: GET
Request URL: http://localhost:8000/

Django Version: 1.6.1
Python Version: 3.4.0
Installed Applications:
('djangocms_admin_style',
 'djangocms_text_ckeditor',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.admin',
 'django.contrib.sites',
 'django.contrib.sitemaps',
 'django.contrib.staticfiles',
 'django.contrib.messages',
 'cms',
 'mptt',
 'menus',
 'south',
 'sekizai',
 'djangocms_style',
 'djangocms_column',
 'djangocms_file',
 'djangocms_flash',
 'djangocms_googlemap',
 'djangocms_inherit',
 'djangocms_link',
 'djangocms_picture',
 'djangocms_teaser',
 'djangocms_video',
 'reversion',
 'my_demo')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'cms.middleware.user.CurrentUserMiddleware',
 'cms.middleware.page.CurrentPageMiddleware',
 'cms.middleware.toolbar.ToolbarMiddleware',
 'cms.middleware.language.LanguageCookieMiddleware')


Traceback:
File "/home/sam/.envs/djangocms3/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
  114.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/sam/.envs/djangocms3/lib/python3.4/site-packages/cms/views.py" in details
  33.     context = RequestContext(request)
File "/home/sam/.envs/djangocms3/lib/python3.4/site-packages/django/template/context.py" in __init__
  168.         for processor in get_standard_processors() + processors:
File "/home/sam/.envs/djangocms3/lib/python3.4/site-packages/django/template/context.py" in get_standard_processors
  148.             func = import_by_path(path)
File "/home/sam/.envs/djangocms3/lib/python3.4/site-packages/django/utils/module_loading.py" in import_by_path
  31.             error_prefix, module_path, class_name))

Exception Type: ImproperlyConfigured at /
Exception Value: Module "cms.context_processors" does not define a "cms_settings" attribute/class

1 个答案:

答案 0 :(得分:0)

我有同样的问题。所以我尝试删除

'cms.context_processors.cms_settings'

位于“TEMPLATE_CONTEXT_PROCESSORS =(”

的底部

它有效!