Rename views

This commit is contained in:
Iacopo Spalletti 2014-03-12 16:21:34 +01:00
parent 9999e6a622
commit b6142d86df
2 changed files with 9 additions and 9 deletions

View File

@ -10,7 +10,7 @@ from .models import Post
class LatestEntriesFeed(Feed):
def link(self):
return reverse('djangocms_blog:latest-posts')
return reverse('djangocms_blog:posts-latest')
def title(self):
return _('Blog articles on %(site_name)s') % {'site_name': Site.objects.get_current().name}

View File

@ -8,13 +8,13 @@ from .feeds import LatestEntriesFeed, TagFeed
urlpatterns = patterns(
'',
url(r'^$', PostListView.as_view(), name='latest-posts'),
url(r'^feed/$', LatestEntriesFeed(), name='latest-posts-feed'),
url(r'^(?P<year>\d{4})/$', PostArchiveView.as_view(), name='archive-year'),
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$', PostArchiveView.as_view(), name='archive-month'),
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'),
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'),
url(r'^author/(?P<username>[\w\.@+-]+)/$', AuthorEntriesView.as_view(), name='author-posts'),
url(r'^category/(?P<category>[\w\.@+-]+)/$', CategoryEntriesView.as_view(), name='category-posts'),
url(r'^tag/(?P<tag>[-\w]+)/$', TaggedListView.as_view(), name='tagged-posts'),
url(r'^tag/(?P<tag>[-\w]+)/feed/$', TagFeed(), name='tagged-posts-feed'),
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'),
)