fnp
/
django-migdal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
97514d9
)
use django's i18n_patterns (require django 1.10)
0.6
author
Jan Szejko
<janek37@gmail.com>
Wed, 29 Mar 2017 08:17:04 +0000
(10:17 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Wed, 29 Mar 2017 08:17:04 +0000
(10:17 +0200)
migdal/urls.py
patch
|
blob
|
history
setup.py
patch
|
blob
|
history
diff --git
a/migdal/urls.py
b/migdal/urls.py
index
8428c9d
..
e32f87a
100644
(file)
--- 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
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
fnpdjango.utils.urls
import i18n_patterns
+import migdal.views
+from
django.conf.urls.i18n
import i18n_patterns
pats = []
for t in app_settings.TYPES:
pats += [
# entry list
url(string_concat(r'^', t.slug, r'/$'),
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<slug>[^/]+)/$'),
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<slug>[^/]+)/$'),
-
'migdal.views.entry'
, {'type_db': t.db},
+
migdal.views.entry
, {'type_db': t.db},
name='migdal_entry_%s' % t.db),
]
urlpatterns = i18n_patterns(
name='migdal_entry_%s' % t.db),
]
urlpatterns = i18n_patterns(
- '',
# main page
# 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(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<category_slug>[^/]*)/$'),
name='migdal_submit_thanks'),
# category
url(string_concat(r'^', _('categories'), r'/(?P<category_slug>[^/]*)/$'),
-
'migdal.views.entry_list'
, name='migdal_category'),
+
migdal.views.entry_list
, name='migdal_category'),
url(string_concat(r'^', _('categories'), r'/(?P<category_slug>[^/]*)/rss.xml$'),
feeds.EntriesFeed(), name='migdal_category_feed'),
url(string_concat(r'^', _('categories'), r'/(?P<category_slug>[^/]*)/rss.xml$'),
feeds.EntriesFeed(), name='migdal_category_feed'),
- url(string_concat(r'^', _('search')), SearchPublishedView(), name='search'),
+ url(string_concat(r'^', _('search')),
migdal.views.
SearchPublishedView(), name='search'),
# type-specific views
# type-specific views
- *pats
+ *pats,
+ prefix_default_language=False
)
)
diff --git
a/setup.py
b/setup.py
index
0d5a48f
..
13aa198
100755
(executable)
--- a/
setup.py
+++ b/
setup.py
@@
-23,7
+23,7
@@
def whole_trees(package_dir, paths):
setup(
name='django-migdal',
setup(
name='django-migdal',
- version='0.
5.2
',
+ version='0.
6
',
author='Radek Czajka',
author_email='radoslaw.czajka@nowoczesnapolska.org.pl',
url='',
author='Radek Czajka',
author_email='radoslaw.czajka@nowoczesnapolska.org.pl',
url='',