sanity check
This commit is contained in:
parent
82d38fc8a1
commit
c2058c6bd5
|
@ -8,7 +8,9 @@ def index(request):
|
|||
return render_to_response("home.html", {})
|
||||
|
||||
def search(request):
|
||||
q = request.GET.get("q")
|
||||
q = request.GET.get("q", "")
|
||||
if q == '':
|
||||
return render_to_json_response({'error': 'empty search'})
|
||||
bing = bingapi.Bing(LIVE_APP_ID)
|
||||
results = bing.do_image_search(q)
|
||||
images = results['SearchResponse']['Image']['Results']
|
||||
|
|
Loading…
Reference in New Issue
Block a user