Fix urlconf
This commit is contained in:
parent
6064f69075
commit
9d9f833c6e
1 changed files with 2 additions and 4 deletions
|
@ -23,8 +23,7 @@ def get_urls():
|
||||||
|
|
||||||
detail_urls = get_urls()
|
detail_urls = get_urls()
|
||||||
|
|
||||||
urlpatterns = patterns(
|
urlpatterns = [
|
||||||
'',
|
|
||||||
url(r'^$',
|
url(r'^$',
|
||||||
PostListView.as_view(), name='posts-latest'),
|
PostListView.as_view(), name='posts-latest'),
|
||||||
url(r'^feed/$',
|
url(r'^feed/$',
|
||||||
|
@ -33,7 +32,6 @@ urlpatterns = patterns(
|
||||||
PostArchiveView.as_view(), name='posts-archive'),
|
PostArchiveView.as_view(), name='posts-archive'),
|
||||||
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$',
|
url(r'^(?P<year>\d{4})/(?P<month>\d{1,2})/$',
|
||||||
PostArchiveView.as_view(), name='posts-archive'),
|
PostArchiveView.as_view(), name='posts-archive'),
|
||||||
) + detail_urls + [
|
|
||||||
url(r'^author/(?P<username>[\w\.@+-]+)/$',
|
url(r'^author/(?P<username>[\w\.@+-]+)/$',
|
||||||
AuthorEntriesView.as_view(), name='posts-author'),
|
AuthorEntriesView.as_view(), name='posts-author'),
|
||||||
url(r'^category/(?P<category>[\w\.@+-]+)/$',
|
url(r'^category/(?P<category>[\w\.@+-]+)/$',
|
||||||
|
@ -42,6 +40,6 @@ urlpatterns = patterns(
|
||||||
TaggedListView.as_view(), name='posts-tagged'),
|
TaggedListView.as_view(), name='posts-tagged'),
|
||||||
url(r'^tag/(?P<tag>[-\w]+)/feed/$',
|
url(r'^tag/(?P<tag>[-\w]+)/feed/$',
|
||||||
TagFeed(), name='posts-tagged-feed'),
|
TagFeed(), name='posts-tagged-feed'),
|
||||||
]
|
] + detail_urls
|
||||||
|
|
||||||
BlogAppConfig.setup()
|
BlogAppConfig.setup()
|
||||||
|
|
Loading…
Add table
Reference in a new issue