From 24b28a504cabcf077882aa95cfa0edbc6a8d4569 Mon Sep 17 00:00:00 2001
From: Dan McGee <dan@archlinux.org>
Date: Tue, 24 Jul 2012 21:01:31 -0500
Subject: Replace deprecated list_detail usage in search with class-based view

We can convert the entire search view to a generic class-based ListView.
This is still one of the more disgusting views in the application and
has a ton of logic scattered buckshot across several methods, but this
commit is not meant to address all of that in one go.

This is the last of the deprecated pieces I know of we are still using
in the codebase, so we should be relatively safe in the long run now for
an upgrade to the eventual next major Django release.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
 packages/urls.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'packages/urls.py')

diff --git a/packages/urls.py b/packages/urls.py
index 6eddc5fe..9a151b4b 100644
--- a/packages/urls.py
+++ b/packages/urls.py
@@ -1,5 +1,7 @@
 from django.conf.urls import include, patterns
 
+from .views.search import SearchListView
+
 package_patterns = patterns('packages.views',
     (r'^$',            'details'),
     (r'^json/$',       'details_json'),
@@ -21,9 +23,9 @@ urlpatterns = patterns('packages.views',
     (r'^signoffs/json/$', 'signoffs_json', {}, 'package-signoffs-json'),
     (r'^update/$',   'update'),
 
-    (r'^$',                      'search', {}, 'packages-search'),
-    (r'^search/json/$',          'search_json'),
-    (r'^(?P<page>\d+)/$',        'search'),
+    (r'^$', SearchListView.as_view(), {}, 'packages-search'),
+    (r'^(?P<page>\d+)/$', SearchListView.as_view()),
+    (r'^search/json/$', 'search_json'),
 
     (r'^differences/$',          'arch_differences', {}, 'packages-differences'),
     (r'^stale_relations/$',      'stale_relations'),
-- 
cgit v1.2.3-2-g168b


From 746023d529489b68f1a2494ff7572734b3b368ce Mon Sep 17 00:00:00 2001
From: Dan McGee <dan@archlinux.org>
Date: Sat, 16 Feb 2013 15:38:29 -0600
Subject: Make page a query string parameter on package search

This is a bit silly to encode in the URL, or at least makes it much
harder to screen out via robots.txt and other such things.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
 packages/urls.py | 1 -
 1 file changed, 1 deletion(-)

(limited to 'packages/urls.py')

diff --git a/packages/urls.py b/packages/urls.py
index 9a151b4b..4e2e2638 100644
--- a/packages/urls.py
+++ b/packages/urls.py
@@ -24,7 +24,6 @@ urlpatterns = patterns('packages.views',
     (r'^update/$',   'update'),
 
     (r'^$', SearchListView.as_view(), {}, 'packages-search'),
-    (r'^(?P<page>\d+)/$', SearchListView.as_view()),
     (r'^search/json/$', 'search_json'),
 
     (r'^differences/$',          'arch_differences', {}, 'packages-differences'),
-- 
cgit v1.2.3-2-g168b