|
|
|
|
@ -96,6 +96,7 @@ class SearchResultsThread(threading.Thread): |
|
|
|
|
loaded = False |
|
|
|
|
while not loaded: |
|
|
|
|
loaded = self.keyword.load_results() |
|
|
|
|
time.sleep(5) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Search(generic.View): |
|
|
|
|
@ -143,7 +144,7 @@ class Search(generic.View): |
|
|
|
|
else: |
|
|
|
|
return HttpResponse(json.dumps({ 'status': 'error', 'description': 'Empty request'}), content_type="application/json") |
|
|
|
|
|
|
|
|
|
loading = SearchResultsThread(keyword=keyword) |
|
|
|
|
loading = SearchResultsThread(keyword=k) |
|
|
|
|
loading.start() |
|
|
|
|
|
|
|
|
|
identity = k.searches.filter(similarity=146)[0] |
|
|
|
|
@ -173,8 +174,6 @@ class Search(generic.View): |
|
|
|
|
'status': 'ok' |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return HttpResponse(json.dumps(response), content_type="application/json") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|