X-Git-Url: https://git.mdrn.pl/prawokultury.git/blobdiff_plain/3f6f55a25872c1d1465f7bdb59e8a766da9c51cc..97a6fccf2124739922f1f5e3e7fc472e2e402a2b:/migdal/urls.py diff --git a/migdal/urls.py b/migdal/urls.py index 63832f4..49a4346 100644 --- a/migdal/urls.py +++ b/migdal/urls.py @@ -6,7 +6,8 @@ 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.helpers import i18n_patterns +from migdal.views import SearchPublishedView +from fnpdjango.utils.urls import i18n_patterns pats = [] for t in app_settings.TYPES: @@ -25,13 +26,9 @@ for t in app_settings.TYPES: ] -# Disable en for now. -urlpatterns = patterns('', - url(r'^en/', handler404), -) -urlpatterns += i18n_patterns('', +urlpatterns = i18n_patterns('', # main page - url(r'^$', 'migdal.views.entry_list', name='migdal_main'), + url(r'^$', 'migdal.views.main', name='migdal_main'), url(r'^rss.xml$', feeds.EntriesFeed(), name='migdal_main_feed'), # submit new entry url(string_concat(r'^', _('submit'), r'/$'), 'migdal.views.submit', name='migdal_submit'), @@ -41,6 +38,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 )