2012-03-14 138 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