From: Jan Szejko Date: Thu, 23 Aug 2018 12:50:53 +0000 (+0200) Subject: Revert "use django's i18n_patterns (require django 1.10)" X-Git-Tag: 0.8.2 X-Git-Url: https://git.mdrn.pl/django-migdal.git/commitdiff_plain/515230d7d1bf3c5208656b4e4f89cbe7a1b8b4b4?ds=inline;hp=02292261ebd2751d8d519fffadfbc1ca9bf43cba Revert "use django's i18n_patterns (require django 1.10)" This reverts commit 09302fe --- diff --git a/migdal/urls.py b/migdal/urls.py index e32f87a..8428c9d 100644 --- a/migdal/urls.py +++ b/migdal/urls.py @@ -7,43 +7,43 @@ from django.conf.urls import url from django.utils.translation import ugettext_lazy as _ from django.utils.translation import string_concat from migdal import feeds, app_settings -import migdal.views -from django.conf.urls.i18n import i18n_patterns +from migdal.views import SearchPublishedView +from fnpdjango.utils.urls import i18n_patterns pats = [] for t in app_settings.TYPES: pats += [ # entry list url(string_concat(r'^', t.slug, r'/$'), - migdal.views.entry_list, {'type_db': t.db}, + 'migdal.views.entry_list', {'type_db': t.db}, name='migdal_entry_list_%s' % t.db), url(string_concat(r'^', t.slug, r'/rss.xml$'), feeds.EntriesFeed(), {'type_db': t.db}, name='migdal_entry_list_%s_feed' % t.db), # single entry url(string_concat(r'^', t.slug, r'/(?P[^/]+)/$'), - migdal.views.entry, {'type_db': t.db}, + 'migdal.views.entry', {'type_db': t.db}, name='migdal_entry_%s' % t.db), ] urlpatterns = i18n_patterns( + '', # main page - url(r'^$', migdal.views.main, 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'), - url(string_concat(r'^', _('submit'), r'/', _('thanks'), r'$'), migdal.views.submit_thanks, + url(string_concat(r'^', _('submit'), r'/$'), 'migdal.views.submit', name='migdal_submit'), + url(string_concat(r'^', _('submit'), r'/', _('thanks'), r'$'), 'migdal.views.submit_thanks', name='migdal_submit_thanks'), # category url(string_concat(r'^', _('categories'), r'/(?P[^/]*)/$'), - migdal.views.entry_list, name='migdal_category'), + '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')), migdal.views.SearchPublishedView(), name='search'), + url(string_concat(r'^', _('search')), SearchPublishedView(), name='search'), # type-specific views - *pats, - prefix_default_language=False + *pats )