2017-09-03 49 views
0

我第一次嘗試使用lektor:我想爲建築作品記錄創建我自己的數據模型。 我有checkboxes和一個奇怪的輸出中lists,如:lektor複選框`[u'`輸出錯誤?

[u'corporate & commercial', u'interiors'] 

poject.ini

[fields.type] 
label = Project type 
type = checkboxes 
choices = corporate & commercial, residential, interiors, public,hotel/tourism, university, art gallery, restoration, spa, auditorium, installations, landscape 
choice_labels = corporate & commercial, residential, interiors, public, hotel/tourism, university, art gallery, restoration, spa, auditorium, installations, landscape 

project.html有:

{% if this.type %} 
<tr> 
<th scope="row">Type</th> 
<td>{{ this.type}}</td> 
</tr> 
{% endif %} 

哪裏是在輸出中那些[u'未來從?我錯過了什麼?

謝謝

AR (在Win 7/64運行LEKTOR 3.0.1)

回答

0

[u表示了目錄(或陣列)。 this.type是您的選擇列表,要獲得一個項目,您可以使用for循環或過濾器等。