2012-03-14 172 views
1

你好,并提前感谢你...扩展base.html错误

在Django我有一个子模板,更新base.html模板。我不断收到一个错误:

<ExtendsNode: extends "base.html"> must be the first tag in the template.

当子模板的代码如下所示:

{% extends "simple/base.html" %} 

{% block picklist %} 

     <title></title> 

     <h1>Simple Index</h1> #... 

我不知道为什么我收到此错误,当EXTENDS标签显然是第一个标签。

基本模板和子模板都位于我的模板路径/简单模板中的相同目录中。

谢谢

DP

回答

1

我想通了这一点......

我不得不在其上注释掉使用HTML <!-- -->评论模板另一个{% extends %}标签。评论被忽略,扩展标签被读取并生成503错误。

谢谢

DP