定位模板的问题

时间:2010-09-25 09:38:40

标签: django django-templates

我正在尝试在我的服务器上安装django lfc。除了我现在遇到的各种不同问题,我正在与TemplateDoesNotExist进行斗争。 在我的设置文件中,我设置了TEMPLATE_DIRS变量,如下所示:

TEMPLATE_DIRS = (
                "/home/snow4life/lfc/templates",
                "/home/snow4life/lfc_theme/templates"
                "/home/snow4life/lfc_blog/templates"
)

它对应于我的文件结构。当我正在尝试运行应用程序时,当其中一个模板加载{% templates %} templatetag时,我得到TemplateDoesNotExist异常,如下所示:

@register.inclusion_tag('lfc/manage/templates.html', takes_context=True)
def templates(context):
    (...)

所以它应该从/lfc/templates/lfc/manage/templates.html加载模板,而只是读取lfc/manage/templates.html,就像从设置中跳过第一个文件夹一样。任何想法如何解决这个问题?我正在使用来自trunk的最新django buildout。告诉我是否应该发布更多信息因为我不确定可能需要什么。

1 个答案:

答案 0 :(得分:1)

更新您的Django安装。

相关问题