aboutsummaryrefslogtreecommitdiffstats
path: root/servo/urls/search.py
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-11-11 15:43:55 +0200
committerFilipp Lepalaan <filipp@mac.com>2015-11-11 15:43:55 +0200
commit19444b3b1c3d80b860d9d749942b7d2558950bcb (patch)
tree0942f5e005b7f607ee64d73978a6cf7912945adc /servo/urls/search.py
parentf51bc293756243e6880a1419a82fb51ea1733a30 (diff)
downloadServo-19444b3b1c3d80b860d9d749942b7d2558950bcb.tar.gz
Servo-19444b3b1c3d80b860d9d749942b7d2558950bcb.tar.bz2
Servo-19444b3b1c3d80b860d9d749942b7d2558950bcb.zip
Refactored searches into separate module
Diffstat (limited to 'servo/urls/search.py')
-rw-r--r--servo/urls/search.py28
1 files changed, 9 insertions, 19 deletions
diff --git a/servo/urls/search.py b/servo/urls/search.py
index 486bdcf..06278d6 100644
--- a/servo/urls/search.py
+++ b/servo/urls/search.py
@@ -3,27 +3,17 @@
from django.conf.urls import patterns, url
from django.views.decorators.cache import cache_page
-from servo.views.search import search_gsx
+from servo.views.search import search_gsx, get_gsx_search_results
urlpatterns = patterns(
"servo.views.search",
- url(r'^$', "spotlight",
- name="search-spotlight"),
- url(r'^gsx/(?P<what>\w+)/$', "list_gsx",
- name="search-gsx"),
- url(r'^gsx/(?P<what>\w+)/for/(?P<q>\w+)/$', "list_gsx",
- name="search-gsx"),
- # /search/gsx/parts/?productName=iPod+Shuffle...
- url(r'^gsx/(?P<what>\w+)/(?P<arg>\w+)/(?P<value>[~\w\s,\-\(\)/\.]+)/$',
- cache_page(60*15)(search_gsx),
+ url(r'^$', "spotlight", name="search-spotlight"),
+ url(r'^customers/$', "customers", name="search-customers"),
+ url(r'^devices/(?P<what>\w+)/(?P<param>\w+)/(?P<query>[~\w\s,\-\(\)/\.]+)/$',
+ "search_gsx",
name="search-search_gsx"),
- url(r'^gsx/(?P<what>\w+)/results/$', "view_gsx_results",
- name="search-gsx_results"),
- url(r'^notes/$', "list_notes"),
- url(r'^products/$', "list_products"),
- url(r'^orders/$', "list_orders"),
- url(r'^customers/$', "list_customers"),
- url(r'^devices/$', "list_devices"),
- url(r'^gsx/$', "list_gsx"),
- url(r'^articles/$', "list_articles"),
+ url(r'^gsx/(?P<what>\w+)/(?P<param>\w+)/(?P<query>[~\w\s,\-\(\)/\.]+)/$',
+ #cache_page(60*15)(get_gsx_search_results),
+ get_gsx_search_results,
+ name="search-get_gsx_search_results"),
)