X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/ce728e78bb55eb75753f40dc5cd0997a53e7dd27..9b6d232f7a8bc0ed1f9b090c06c8438db14e8179:/migdal/urls.py?ds=inline diff --git a/migdal/urls.py b/migdal/urls.py index 9215078..c7db6f4 100644 --- a/migdal/urls.py +++ b/migdal/urls.py @@ -2,10 +2,11 @@ # This file is part of PrawoKultury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # -from django.conf.urls import patterns, include, url +from django.conf.urls import patterns, include, url, handler404 from django.utils.translation import ugettext_lazy as _ from django.utils.translation import string_concat from migdal import feeds, app_settings +from migdal.views import SearchPublishedView from migdal.helpers import i18n_patterns pats = [] @@ -24,7 +25,12 @@ for t in app_settings.TYPES: name='migdal_entry_%s' % t.db), ] -urlpatterns = i18n_patterns('', + +# Disable en for now. +urlpatterns = patterns('', + url(r'^en/', handler404), +) +urlpatterns += i18n_patterns('', # main page url(r'^$', 'migdal.views.entry_list', name='migdal_main'), url(r'^rss.xml$', feeds.EntriesFeed(), name='migdal_main_feed'), @@ -36,6 +42,7 @@ urlpatterns = i18n_patterns('', 'migdal.views.entry_list', name='migdal_category'), url(string_concat(r'^', _('categories'), r'/(?P[^/]*)/rss.xml$'), feeds.EntriesFeed(), name='migdal_category_feed'), + url(string_concat(r'^', _('search')), SearchPublishedView(), name='search'), # type-specific views *pats )