Don't render twice on HTMX requests
This commit is contained in:
parent
9774da0d00
commit
fe84a7b604
|
@ -45,6 +45,8 @@ $(document).ready(function(){
|
|||
"msg_id": "off",
|
||||
"net_id": "off",
|
||||
"user_id": "off",
|
||||
"nick_id": "off",
|
||||
"status": "off",
|
||||
"num_users": "off",
|
||||
"num_chans": "off",
|
||||
"exemption": "off",
|
||||
|
|
|
@ -211,14 +211,16 @@ def drilldown_search(request, return_context=False, template=None):
|
|||
context["class"] = "warning"
|
||||
|
||||
# unique = str(uuid.uuid4())[:8]
|
||||
if return_context:
|
||||
return context
|
||||
|
||||
response = render(request, template_name, context)
|
||||
if request.GET:
|
||||
if request.htmx:
|
||||
response["HX-Push"] = reverse("home") + "?" + url_params
|
||||
elif request.POST:
|
||||
response["HX-Push"] = reverse("home") + "?" + url_params
|
||||
if return_context:
|
||||
return context
|
||||
|
||||
return response
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue