2014-02-18 46 views

回答

3

我只是做了一些玩耍,並得出這個結論:

{% if field.widget.input_type != 'hidden' % 
    {{ field.label }} 
{% endif %} 
+0

的FileInput似乎並不具有這種屬性。我必須做getattr(field.widget,'input_type',None)!='隱藏' – Daniel

相關問題