Beispiel #1
0
def searchXml(request):
    if 'q' in request.POST:
        q = request.POST['q']
        found_entries = search1(q)
        return render_to_response('search.xml', {'search': q, 'list': found_entries}, mimetype="application/xml")
    else:
        return HttpResponseBadRequest('<search />')
Beispiel #2
0
def search(request):
	# TODO: multiple search pages!
	q = ""
	if 'q' in request.GET:
		q = request.GET['q']
		found_entries = search1(q)
	else:
		found_entries = ''
	return render_to_response('search.html', { 'search': q, 'list': found_entries, 'request': request })