From c50e600e708d2083290134440223ab65076376ee Mon Sep 17 00:00:00 2001 From: Eevee Date: Sun, 4 Oct 2009 19:17:44 -0700 Subject: [PATCH] Make search a GET to /search. --- floof/config/routing.py | 2 ++ floof/controllers/search.py | 10 ++-------- floof/templates/base.mako | 4 ++-- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/floof/config/routing.py b/floof/config/routing.py index f78246a..03edbeb 100644 --- a/floof/config/routing.py +++ b/floof/config/routing.py @@ -26,6 +26,8 @@ def make_map(): map.connect('/account/login_begin', controller='account', action='login_begin', **require_POST) map.connect('/account/login_finish', controller='account', action='login_finish') + map.connect('/search', controller='search', action='index') + map.connect('/{controller}/{action}') map.connect('/{controller}/{action}/{id}') diff --git a/floof/controllers/search.py b/floof/controllers/search.py index 75bbba8..88dfbe3 100644 --- a/floof/controllers/search.py +++ b/floof/controllers/search.py @@ -13,14 +13,8 @@ import elixir class SearchController(BaseController): def index(self): - # Return a rendered template - #return render('/search.mako') - # or, return a response - return 'Hello World' - - def results(self): - """ Search, implemented the stupid way! """ - query = request.params.get('query','') + """Search, implemented the stupid way!""" + query = request.params.get('query', '') tags = query.split() tagtexts = TagText.query.filter(TagText.text.in_(tags)) diff --git a/floof/templates/base.mako b/floof/templates/base.mako index 19f8455..e36f3ea 100644 --- a/floof/templates/base.mako +++ b/floof/templates/base.mako @@ -10,8 +10,8 @@