def response(resp):
    results = []
    content = resp.text
    try:
        res_json = loads(content)
    except:
        return []
    for result in res_json['results']:
        title = result['title']
        url = result['url']
        thumbnail = result['thumbnail']
        image = result['image']
        results.append({'template': 'images.html', 'title': title, 'content': '', 'thumbnail_src': thumbnail, 'img_src': image, 'url': url})
    return results
def response(resp):
    results = []
    content = resp.text
    try:
        res_json = loads(content)
    except:
        return []
    for result in res_json['results']:
        title = result['title']
        url = result['url']
        thumbnail = result['thumbnail']
        image = result['image']
        results.append({'template': 'images.html', 'title': title, 'content': , 'thumbnail_src': thumbnail, 'img_src': image, 'url': url})
    return results