`
chensss2008
  • 浏览: 91626 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

初次体验django-cms

阅读更多

django-cms 是一个依托django 的cms系统,一直对django 有兴趣,但是一直没有更深入的学习,今天闲来无事,就尝试了一下,配置还算简单,按网站上的配置作就可以了,但是配置完以后,登录admin都,在新增一个page的时候,发生错误:
TemplateSyntaxError at /admin/cms/page/add/

Invalid block tag: 'include_admin_script'
Request Method: GET
Request URL: http://localhost:8002/admin/cms/page/add/
Exception Type: TemplateSyntaxError
Exception Value:  

Invalid block tag: 'include_admin_script'

Exception Location: /usr/lib/python2.5/site-packages/django/template/__init__.py in invalid_block_tag, line 333
Python Executable: /usr/bin/python
Python Version: 2.5.2
Python Path: ['/home/jerry/workspace/python/projects/newtest', '/usr/lib/python2.5/site-packages/setuptools-0.6c6-py2.5.egg', '/usr/lib/python2.5/site-packages/flup-1.0.1-py2.5.egg', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/site-packages/gst-0.10', '/var/lib/python-support/python2.5', '/usr/lib/python2.5/site-packages/gtk-2.0', '/var/lib/python-support/python2.5/gtk-2.0', '/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode']
Server time: 星期日, 12 四月 2009 08:21:34 -0500
Template error

In template /home/jerry/workspace/python/projects/newtest/cms/templates/admin/cms/page/change_form.html, error at line 5
Invalid block tag: 'include_admin_script'
1 {% extends "admin/base_site.html" %}
2 {% load i18n admin_modify adminmedia cms_admin %}
3 {% block extrahead %}{{ block.super }}
4 <script type="text/javascript" src="../../../../jsi18n/"></script>
5 {% for js in javascript_imports %}{% include_admin_script js %}{% endfor %}
6 {% endblock %}
7 {% block stylesheet %}{% admin_media_prefix %}css/forms.css" />
8 <link rel="stylesheet" type="text/css" href="{% admin_media_prefix %}cms/admin.css{% endblock %}
9 {% block coltype %}{% if ordered_objects %}colMS{% else %}colM{% endif %}{% endblock %}
10 {% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}
11 {% block userlinks %}<a href="../../../doc/">{% trans 'Documentation' %}</a> / <a href="../../../password_change/">{% trans 'Change password' %}</a> / <a href="../../../logout/">{% trans 'Log out' %}</a>{% endblock %}
12 {% block breadcrumbs %}{% endblock %}
13 {% block content %}<div id="content-main">
14 {% block object-tools %}
15 {% if change %}{% endif %}
Traceback Switch to copy-and-paste view

  * /usr/lib/python2.5/site-packages/django/core/handlers/base.py in get_response
  79. # Apply view middleware
  80. for middleware_method in self._view_middleware:
  81. response = middleware_method(request, callback, callback_args, callback_kwargs)
  82. if response:
  83. return response
  84.
  85. try:
  86. response = callback(request, *callback_args, **callback_kwargs) ...
  87. except Exception, e:
  88. # If the view raised an exception, run it through exception
  89. # middleware, and if the exception middleware returns a
  90. # response, use that. Otherwise, reraise the exception.
  91. for middleware_method in self._exception_middleware:
  92. response = middleware_method(request, e)
 
=====================>

You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.

google了一下,发现别人也有遇到过此问题,是由于使用的django old version 的template,故会出现问题,但是目前还没有找到解决方法,使用 svn版本也还是有其他的问题,此次尝试以失败告终。不知道有没有其他朋友尝试成功?!

分享到:
评论
1 楼 ego008 2009-07-24  
simple cms engine on GAE
support picasaweb
Example Site 示例网站
http://www.19tm.cn/
http://cmsdome.appspot.com

相关推荐

Global site tag (gtag.js) - Google Analytics