【发布时间】:2018-12-01 06:07:41
【问题描述】:
当我点击链接时
<a href="?page={{request.GET.page}}&order_by=counter__service__name_service&sort={{ sort_type }}&from_date={{request.GET.from_date}}&from_date={{request.GET.to_date}}&type_water={{request.GET.type_water}}">
所有参数都保存为表单和其余部分,但是当我尝试将参数也保留在表单操作方法中时
<form class="row justify-content-around" id="searchform" action="{% url 'history_application' %}?page={{request.GET.page}}&order_by={{request.GET.order_by}}&sort={{request.GET.sort}}" method="get" accept-charset="utf-8">
它会删除它们(网址:history/?type_water=hot&from_date=&to_date=)。
为什么参数不保留在查询中?
【问题讨论】:
标签: django django-templates forms