|
|
|
@ -91,7 +91,7 @@ def render(template_name, **kwargs):
|
|
|
|
|
for ccateg in cookie_categories:
|
|
|
|
|
if ccateg in categories:
|
|
|
|
|
kwargs['selected_categories'].append(ccateg)
|
|
|
|
|
if not len(kwargs['selected_categories']):
|
|
|
|
|
if not kwargs['selected_categories']:
|
|
|
|
|
kwargs['selected_categories'] = ['general']
|
|
|
|
|
return render_template(template_name, **kwargs)
|
|
|
|
|
|
|
|
|
@ -150,7 +150,7 @@ def index():
|
|
|
|
|
elif search.request_data.get('format') == 'csv':
|
|
|
|
|
csv = UnicodeWriter(cStringIO.StringIO())
|
|
|
|
|
keys = ('title', 'url', 'content', 'host', 'engine', 'score')
|
|
|
|
|
if len(search.results):
|
|
|
|
|
if search.results:
|
|
|
|
|
csv.writerow(keys)
|
|
|
|
|
for row in search.results:
|
|
|
|
|
row['host'] = row['parsed_url'].netloc
|
|
|
|
|