小编xas*_*123的帖子

如何在django中获取复选框值?

<tr name="item">
        <td><input type="checkbox" ></td>
        <td>>{{ foo }}</td>
        <td> {{ bar }} </td>


</tr>
Run Code Online (Sandbox Code Playgroud)

现在我希望在django视图中request.POST.getlist('item')返回ie foo和的值bar.但它返回null.

html python django django-templates

3
推荐指数
1
解决办法
9100
查看次数

正确使用django模板中的其他方法?

{% if {{result}} == 'Invalid' %}
 <span class="error-message-uname">Invalid .</span>
{% endif %}
Run Code Online (Sandbox Code Playgroud)

python django

2
推荐指数
1
解决办法
5423
查看次数

标签 统计

django ×2

python ×2

django-templates ×1

html ×1