【发布时间】:2011-08-13 00:33:51
【问题描述】:
大家好,不知道如何解释清楚,但是这里......
我需要像这样使用两个变量:
{% for client in clients %}
{% if user.client.username %}
我需要 {% if user.username %} 但用户名的值在循环中的 client.username 中。
有没有办法做到这一点?
【问题讨论】:
-
你需要更好地解释你的问题......
-
显示为您的模特并告诉我们您到底想做什么
-
请多解释一下。如果您需要的值像您所说的那样在 client.username 中,为什么不能使用 {% if client.username %}?
标签: python django google-app-engine django-templates