From 8923121f192aacc801491e6f359e1cf514cb8d61 Mon Sep 17 00:00:00 2001 From: gfawcett Date: Sat, 10 Jan 2009 19:39:35 +0000 Subject: [PATCH] using locals() in search-results. This works because locals is a dict, and .render expects keyword args, and you can supply a dict as a keyword set using the **dict syntax. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@97 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- conifer/syrup/views.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/conifer/syrup/views.py b/conifer/syrup/views.py index b273404..9eb71f3 100644 --- a/conifer/syrup/views.py +++ b/conifer/syrup/views.py @@ -239,18 +239,5 @@ def search(request): print term ''' - #not sure this would be the best way but locals() would be cleaner - #can this be done with genshi? - ''' - return g.render('search_results.xhtml', locals()) - ''' - return g.render('search_results.xhtml', paginator=paginator, - page_num=page_num, - count=count, query_string=query_string, - course_list=course_list, - instructor_list=instructor_list, - norm_query=norm_query, - results_len=results_len, - course_len=course_len, - instr_len=instr_len) + return g.render('search_results.xhtml', **locals()) -- 2.11.0