[extensions-web] views: Add support for version filtering to the extension views page



commit 8b626a506e48f1b0a8ef56a0f417426aa1ecaa0a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Mar 18 01:52:54 2013 -0400

    views: Add support for version filtering to the extension views page

 sweettooth/extensions/views.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index 44ceba2..a64ed86 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -168,7 +168,11 @@ def ajax_query_params_query(request, n_per_page):
 def ajax_query_search_query(request, n_per_page):
     querystring = request.GET.get('search', '')
 
-    database, enquire = search.enquire(querystring)
+    version_strings = request.GET.getlist('shell_version')
+    if version_strings in (['all'], ['-1']):
+        version_strings = None
+
+    database, enquire = search.enquire(querystring, version_strings)
 
     page = request.GET.get('page', 1)
     try:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]