Browse Source

Clean up, don't blow up on non-GET requests

pull/549/head
parent
commit
fd080374fa
Signed by: hristoast GPG Key ID: 5FC7664AD47AA1C5
  1. 19
      momw/search/views.py

19
momw/search/views.py

@ -71,15 +71,16 @@ def advanced_search(request):
},
)
# TODO: Advanced search
else:
context = {
"cat_name": request.GET.get("a", None),
"cat_desc": request.GET.get("b", None),
"mod_name": request.GET.get("d", None),
"mod_cat": request.GET.get("e", None),
"mod_active": request.GET.get("k", None),
}
return render(request, t, context)
context = {
"cat_name": request.GET.get("a", None),
"cat_desc": request.GET.get("b", None),
"mod_name": request.GET.get("d", None),
"mod_cat": request.GET.get("e", None),
"mod_active": request.GET.get("k", None),
}
return render(request, t, context)
# Non-GET requests make the page blow up. Put an end to that.
return render(request, t)
def _search(Class: Model, text: str, vectors: dict, required_rank=0.1):

Loading…
Cancel
Save