對不起,如果我是一個白癡,但如果標籤發生了什麼?這個Django模板如果標籤發生了什麼?
視圖return:
return render_to_response('productos/por_estado.html', {'productos':productos},
context_instance=RequestContext(request))
#Im not returning 'estado' !
模板:
{% if estado %}
{% block activos_active %}class="active"{% endblock %}
{% endif %}
模板HTML結果:
class="active"
:S
所以我必須做一些棘手的另一種方式來設置「類=」活動「 」。謝謝你4快速回復。 – panchicore 2009-09-29 00:48:13