From d896bfa5b19069ef4dab94e7f9d681c6b96816e8 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Fri, 15 Mar 2013 22:36:03 +0000 Subject: Began work with implementing general search --- wqflask/wqflask/search_results.py | 12 ++++++++---- wqflask/wqflask/templates/index_page.html | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/search_results.py b/wqflask/wqflask/search_results.py index fb8e0921..fde30944 100644 --- a/wqflask/wqflask/search_results.py +++ b/wqflask/wqflask/search_results.py @@ -57,10 +57,14 @@ class SearchResultPage(): # self.dataset_groups = map(lambda x: x[1], results) # self.dataset_group_ids = map(lambda x: x[2], results) #else: - self.dataset = create_dataset(kw['dataset']) - - self.search_terms = kw['search_terms'] - + if kw['q']: + self.quick_search = True + self.search_terms = kw['q'] + else: + self.quick_search = False + self.search_terms = kw['search_terms'] + self.dataset = create_dataset(kw['dataset']) + self.search() self.gen_search_result() diff --git a/wqflask/wqflask/templates/index_page.html b/wqflask/wqflask/templates/index_page.html index c01898b3..8a05173f 100644 --- a/wqflask/wqflask/templates/index_page.html +++ b/wqflask/wqflask/templates/index_page.html @@ -18,6 +18,7 @@
+