aboutsummaryrefslogtreecommitdiff
path: root/weblog/urls.py
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <contact@yaroslavps.com>2018-07-17 23:38:36 +0300
committerYaroslav de la Peña Smirnov <contact@yaroslavps.com>2018-07-17 23:38:36 +0300
commitcbdb0e328482b5a972a0bab8515617d12a40d4a6 (patch)
tree9aeb8ab7de907274c44077261ff7ead8ee257332 /weblog/urls.py
parent4c0ceda024f47461cffaac4ea9bea11e472f2b49 (diff)
parent06b58a6a3afbe3e9ffac45b363cfeafcf0e4b3f2 (diff)
downloadw3blog-cbdb0e328482b5a972a0bab8515617d12a40d4a6.tar.gz
w3blog-cbdb0e328482b5a972a0bab8515617d12a40d4a6.zip
merge of postlang and rss
Diffstat (limited to 'weblog/urls.py')
-rwxr-xr-xweblog/urls.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/weblog/urls.py b/weblog/urls.py
index 71206bb..ddc2c9f 100755
--- a/weblog/urls.py
+++ b/weblog/urls.py
@@ -1,8 +1,19 @@
from django.conf.urls import url
from . import views
+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'),