From 743349c4413cfceb6f52a12e0a0790d9db346c98 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 19 Mar 2012 13:58:57 +0100 Subject: [PATCH] search fixes --- apps/catalogue/urls.py | 12 ++++++++---- wolnelektury/static/js/widget.js | 2 +- wolnelektury/static/opensearch.xml | 10 +++++----- wolnelektury/templates/superbase.html | 2 +- wolnelektury/urls.py | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/apps/catalogue/urls.py b/apps/catalogue/urls.py index 88e622678..c40c4ec29 100644 --- a/apps/catalogue/urls.py +++ b/apps/catalogue/urls.py @@ -4,8 +4,6 @@ # from django.conf.urls.defaults import * from catalogue.feeds import AudiobookFeed -from catalogue.models import Book -from picture.models import Picture from catalogue.views import CustomPDFFormView @@ -25,7 +23,7 @@ urlpatterns = patterns('picture.views', url(r'^daisy/$', 'daisy_list', name='daisy_list'), url(r'^tags/$', 'tags_starting_with', name='hint'), url(r'^jtags/$', 'json_tags_starting_with', name='jhint'), - url(r'^szukaj/$', 'search', name='old_search'), + #url(r'^szukaj/$', 'search', name='old_search'), # zip url(r'^zip/pdf\.zip$', 'download_zip', {'format': 'pdf', 'slug': None}, 'download_zip_pdf'), @@ -48,4 +46,10 @@ urlpatterns = patterns('picture.views', url(r'^custompdf$', CustomPDFFormView(), name='custom_pdf_form'), url(r'^custompdf/(?P%s).pdf' % SLUG, 'download_custom_pdf'), -) +) + +urlpatterns += patterns('django.views.generic.simple', + # old static pages - redirected + url(r'^szukaj/$', 'redirect_to', + {'url': '/szukaj/'}), +) diff --git a/wolnelektury/static/js/widget.js b/wolnelektury/static/js/widget.js index d8e1feca7..de30eb714 100644 --- a/wolnelektury/static/js/widget.js +++ b/wolnelektury/static/js/widget.js @@ -17,7 +17,7 @@ stylesheet.setAttribute('rel', 'stylesheet'); stylesheet.setAttribute('href', 'http://'+host+'/static/css/widget.css'); linkLogo.setAttribute('href', 'http://'+host); logo.setAttribute('src', 'http://'+host+'/static/img/logo.png'); -form.setAttribute('action', 'http://'+host+'/fullsearch/'); +form.setAttribute('action', 'http://'+host+'/szukaj/'); form.setAttribute('method', 'get'); form.setAttribute('accept-charset', 'utf-8'); form.setAttribute('id', 'wl-form'); diff --git a/wolnelektury/static/opensearch.xml b/wolnelektury/static/opensearch.xml index cf904d04e..1e05889ad 100644 --- a/wolnelektury/static/opensearch.xml +++ b/wolnelektury/static/opensearch.xml @@ -8,12 +8,12 @@ Fundacja Nowoczesna Polska pl fundacja@nowoczesnapolska.org.pl - http://www.wolnelektury.pl/static/img/favicon.ico - http://www.wolnelektury.pl/static/img/wl_icon_64.png + http://static.wolnelektury.pl/static/img/favicon.ico + http://static.wolnelektury.pl/static/img/wl_icon_64.png - + template="http://wolnelektury.pl/opds/search/?q={searchTerms}&author={atom:author}&translator={atom:contributor}&title={atom:title}" /> + - http://www.wolnelektury.pl/katalog/ + http://wolnelektury.pl/ diff --git a/wolnelektury/templates/superbase.html b/wolnelektury/templates/superbase.html index 1cb43b082..138bffe2a 100644 --- a/wolnelektury/templates/superbase.html +++ b/wolnelektury/templates/superbase.html @@ -96,7 +96,7 @@ -
+
diff --git a/wolnelektury/urls.py b/wolnelektury/urls.py index 3806b73ce..d0270365b 100644 --- a/wolnelektury/urls.py +++ b/wolnelektury/urls.py @@ -44,7 +44,7 @@ urlpatterns += patterns('', # API (r'^api/', include('api.urls')), - url(r'^fullsearch/', include('search.urls')), + url(r'^szukaj/', include('search.urls')), # Static files url(r'^%s(?P.*)$' % settings.MEDIA_URL[1:], 'django.views.static.serve', -- 2.20.1