扩展CKAN模板时遇到麻烦

时间:2017-07-31 18:33:43

标签: jinja2 ckan theming

我按照以下方式扩展了ckan模板: http://docs.ckan.org/en/latest/theming/templates.html 因此,当我在扩展程序中的空index.html文件中添加{%ckan_extends%}以使用原始index.html时,我得到以下异常和回溯(我的调试设置为true):

WebError Traceback:
⇝ ValueError: invalid literal for int() with base 10: ''
View as:   Interactive (full)  |  Text (full)  |  XML (full)
Module ckan.controllers.home:88 in index          view
>>  return base.render('home/index.html', cache_force=True)
Module ckan.lib.base:174 in render          view
>>  return cached_template(template_name, render_template)
Module pylons.templating:249 in cached_template          view
>>  return render_func()
Module ckan.lib.base:128 in render_template          view
>>  return render_jinja2(template_name, globs)
Module ckan.lib.base:85 in render_jinja2          view
>>  return template.render(**extra_vars)
Module jinja2.environment:989 in render          view
>>  return self.environment.handle_exception(exc_info, True)
Module jinja2.environment:748 in handle_exception          view
>>  traceback = _make_traceback(exc_info, source_hint)
Module jinja2.debug:140 in make_traceback          view
>>  return translate_exception(exc_info, initial_skip)
Module jinja2.debug:182 in translate_exception          view
>>  lineno = template.get_corresponding_lineno(tb.tb_lineno)
Module jinja2.environment:1056 in get_corresponding_lineno          view
>>  for template_line, code_line in reversed(self.debug_info):
Module jinja2.environment:1072 in debug_info          view
>>  self._debug_info.split('&')]
ValueError: invalid literal for int() with base 10: ''

需要帮助。

0 个答案:

没有答案