Remove some debugging code
This commit is contained in:
parent
7c02e8fe89
commit
303d3cbcf6
|
@ -17,7 +17,6 @@ class Drilldown(LoginRequiredMixin, View):
|
||||||
return render(request, self.template_name)
|
return render(request, self.template_name)
|
||||||
|
|
||||||
def post(self, request):
|
def post(self, request):
|
||||||
print("POST")
|
|
||||||
if not request.user.has_plan(self.plan_name):
|
if not request.user.has_plan(self.plan_name):
|
||||||
return render(request, "denied.html")
|
return render(request, "denied.html")
|
||||||
if "query" in request.POST:
|
if "query" in request.POST:
|
||||||
|
@ -25,13 +24,9 @@ class Drilldown(LoginRequiredMixin, View):
|
||||||
results = run_main_query(client, query)
|
results = run_main_query(client, query)
|
||||||
results_parsed = []
|
results_parsed = []
|
||||||
if "hits" in results.keys():
|
if "hits" in results.keys():
|
||||||
print("hits in results")
|
|
||||||
if "hits" in results["hits"]:
|
if "hits" in results["hits"]:
|
||||||
print("hits in hits")
|
|
||||||
for item in results["hits"]["hits"]:
|
for item in results["hits"]["hits"]:
|
||||||
print("ITER", item)
|
|
||||||
results_parsed.append(item["_source"])
|
results_parsed.append(item["_source"])
|
||||||
context = {"query": query, "results": results_parsed}
|
context = {"query": query, "results": results_parsed}
|
||||||
print("CONTEXT", context)
|
|
||||||
return render(request, self.template_name, context)
|
return render(request, self.template_name, context)
|
||||||
return render(request, self.template_name)
|
return render(request, self.template_name)
|
||||||
|
|
Loading…
Reference in New Issue