diff options
Diffstat (limited to 'weblog/urls.py')
-rwxr-xr-x | weblog/urls.py | 13 |
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'),
|