djangocms_blog/djangocms_blog/urls.py

20 lines
1.1 KiB
Python
Raw Normal View History

2014-01-04 16:07:09 +00:00
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from .feeds import LatestEntriesFeed, TagFeed
2015-07-18 15:33:36 +00:00
from .views import (AuthorEntriesView, CategoryEntriesView, PostArchiveView, PostDetailView,
PostListView, TaggedListView)
2014-01-04 16:07:09 +00:00
urlpatterns = patterns(
'',
2014-03-12 15:21:34 +00:00
url(r'^$', PostListView.as_view(), name='posts-latest'),
url(r'^feed/$', LatestEntriesFeed(), name='posts-latest-feed'),
url(r'^(?P<year>\d{4})/$', PostArchiveView.as_view(), name='posts-archive'),
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$', PostArchiveView.as_view(), name='posts-archive'),
2014-01-04 16:07:09 +00:00
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/(?P<day>\d{1,2})/(?P<slug>\w[-\w]*)/$', PostDetailView.as_view(), name='post-detail'),
2014-03-12 15:21:34 +00:00
url(r'^author/(?P<username>[\w\.@+-]+)/$', AuthorEntriesView.as_view(), name='posts-author'),
url(r'^category/(?P<category>[\w\.@+-]+)/$', CategoryEntriesView.as_view(), name='posts-category'),
url(r'^tag/(?P<tag>[-\w]+)/$', TaggedListView.as_view(), name='posts-tagged'),
url(r'^tag/(?P<tag>[-\w]+)/feed/$', TagFeed(), name='posts-tagged-feed'),
2014-01-04 16:07:09 +00:00
)