diff options
author | Yaroslav de la Peña Smirnov <contact@yaroslavps.com> | 2018-06-20 16:14:20 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <contact@yaroslavps.com> | 2018-06-20 16:14:20 +0300 |
commit | 06b58a6a3afbe3e9ffac45b363cfeafcf0e4b3f2 (patch) | |
tree | 4659c4eda47b78188f1cbff5339bbe03b31d8d5b /weblog/urls.py | |
parent | 843e7e06709a35a162ddb28e9eef528870e2c0f6 (diff) | |
download | w3blog-06b58a6a3afbe3e9ffac45b363cfeafcf0e4b3f2.tar.gz w3blog-06b58a6a3afbe3e9ffac45b363cfeafcf0e4b3f2.zip |
rss bug fixes
Diffstat (limited to 'weblog/urls.py')
-rwxr-xr-x | weblog/urls.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/weblog/urls.py b/weblog/urls.py index 4d6a325..b3e95b1 100755 --- a/weblog/urls.py +++ b/weblog/urls.py @@ -4,7 +4,16 @@ from weblog.feeds import BlogFeed from weblog.apps import SETTINGS as blog_settings
app_name = 'weblog'
-urlpatterns = [
+
+urlpatterns = []
+
+if blog_settings['enable_rss']:
+ urlpatterns += [
+ url(r'^rss/$', BlogFeed(), name='RSS'),
+ url(r'^(?P<category_slug>[-\w]+)/rss/$', BlogFeed(), name='CategoryRSS'),
+ ]
+
+urlpatterns += [
url(r'^$', views.Index, name='Index'),
url(r'^change-language/(?P<language>[-\w]+)/$', views.ChangeLanguage, name='ChangeLanguage'),
url(r'^(?P<year>[0-9]{4})/$', views.Index, name='ArchiveIndex'),
@@ -12,9 +21,3 @@ urlpatterns = [ url(r'^(?P<category_slug>[-\w]+)/$', views.Index, name='CategoryIndex'),
url(r'^(?P<category_slug>[-\w]+)/(?P<post_slug>[-\w]+)/$', views.PostView, name='PostView'),
]
-
-if blog_settings['enable_rss']:
- urlpatters += [
- url(r'^/rss/$', BlogFeed(), name='RSS'),
- url(r'^/(?P<category_slug>[-\w]+)/rss/$', BlogFeed(), name='CategoryRSS'),
- ]
|