Esempio n. 1
0
def advanced_search(request):
    keywords = request.POST.get("keywords")
    daterange = request.POST.get("daterange")
    categories = request.POST.getlist("categories[]")
    result = search_by_all(keywords=keywords,
                           ctg=categories,
                           daterange=daterange)
    return JsonResponse(result, safe=False)
Esempio n. 2
0
 def post(self, request, *args, **kwargs):
     keywords = request.POST.get('keywords')
     categories = request.POST.getlist('categories')
     daterange = request.POST.get('daterange')
     results = search_by_all(keywords=keywords,
                             ctg=categories,
                             daterange=daterange)
     return render(request, 'newsfocus/results.html', {'results': results})
Esempio n. 3
0
def ordinary_search(request):
    keywords = request.POST.get("keywords")
    result = search_by_all(keywords=keywords)
    return JsonResponse(result, safe=False)
Esempio n. 4
0
def advanced_search(request):
	keywords = request.POST.get("keywords")
	daterange = request.POST.get("daterange")
	categories = request.POST.getlist("categories[]")
	result = search_by_all(keywords=keywords, ctg=categories, daterange=daterange)
	return JsonResponse(result, safe=False)
Esempio n. 5
0
def ordinary_search(request):
	keywords = request.POST.get("keywords")
	result = search_by_all(keywords=keywords)
	return JsonResponse(result, safe=False)
Esempio n. 6
0
	def post(self, request, *args, **kwargs):
		keywords = request.POST.get('keywords')
		categories = request.POST.getlist('categories')
		daterange = request.POST.get('daterange')
		results = search_by_all(keywords=keywords, ctg=categories, daterange=daterange)
		return render(request, 'newsfocus/results.html', {'results': results})