4

我有: Python 2.6 Django 1.1.1 我从 git://github.com/digi604/django-cms-2.0.git 下载了 Django-cms 我通过了南关/开

我坚持这一点:

启用南同步数据库后返回:

Synced:
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.admin
 > django.contrib.sites
 > publisher
 > mptt
 > reversion
 > example.categories
 > south
 > example.sampleapp

Not synced (use migrations):
 - cms
 - cms.plugins.text
 - cms.plugins.picture
 - cms.plugins.file
 - cms.plugins.flash
 - cms.plugins.link
 - cms.plugins.snippet
 - cms.plugins.googlemap
 - cms.plugins.teaser
 - cms.plugins.video
 - cms.plugins.twitter
 - cms.plugins.inherit
(use ./manage.py migrate to migrate these)

startserver 返回(当我在浏览器 127.0.0.1:8000 中打开时):

Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/django/core/servers/basehttp.py",
line 279, in run
self.result = application(self.environ, self.start_response)

File "/usr/lib/pymodules/python2.6/django/core/servers/basehttp.py",
line 651, in __call__
return self.application(environ, start_response)

File "/usr/lib/pymodules/python2.6/django/core/handlers/wsgi.py",
line 230, in __call__
self.load_middleware()

File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py",
line 42, in load_middleware
raise exceptions.ImproperlyConfigured,
'Error importing middleware %s: "%s"' % (mw_module, e)

ImproperlyConfigured: Error importing middleware django.middleware.csrf:
"No module named csrf"

[25/Feb/2010 05:49:43] "GET / HTTP/1.1" 500 746

当我评论行时:

#'django.middleware.csrf.CsrfViewMiddleware',  - in MIDDLEWARE_CLASSES
#'django.core.context_processors.csrf', - in TEMPLATE_CONTEXT_PROCESSORS

我现在可以运行它,但是当我尝试添加页面时,我看到:

Template error

In template /home/gennadich/Documents/django-cms-2.0/cms/templates/admin/cms/page/change_form.html, error at line 97
Invalid block tag: 'csrf_token'
4

3 回答 3

3

现在您已禁用 CSRF 模块,您不再有任何可用的 CSRF 标签。启用 CSRF 模块或删除所有 CSRF 标签。

于 2010-02-26T11:04:00.797 回答
1

禁用南或尝试postgresql。我最终禁用了南,因为我只是在我的开发机器上乱搞

[编辑]

这也适用于最新的 pinax 树干(2010 年 3 月 22 日)

[编辑]

尝试升级 django 的最新版本,此时 1.2 beta

于 2010-03-22T14:33:58.717 回答
0

看起来还没有为新的 django + django-cms Project People 发现标准和正确的程序。我从早上 9 点开始尝试。现在晚上 7:30。

于 2013-07-22T14:00:01.043 回答