2011-02-19 13:26:27 +03:00
|
|
|
from django.conf.urls.defaults import patterns, url
|
|
|
|
from blogpost.views import BlogPosts, BlogPostInstance, Comments, CommentInstance
|
2011-01-24 02:08:16 +03:00
|
|
|
|
2011-02-19 13:26:27 +03:00
|
|
|
urlpatterns = patterns('',
|
|
|
|
url(r'^$', BlogPosts.as_view(), name='blog-posts'),
|
|
|
|
url(r'^(?P<key>[^/]+)/$', BlogPostInstance.as_view(), name='blog-post'),
|
2011-02-19 20:55:32 +03:00
|
|
|
url(r'^(?P<blogpost>[^/]+)/comments/$', Comments.as_view(), name='comments'),
|
2011-02-19 13:26:27 +03:00
|
|
|
url(r'^(?P<blogpost>[^/]+)/comments/(?P<id>[^/]+)/$', CommentInstance.as_view(), name='comment'),
|
2011-01-24 02:08:16 +03:00
|
|
|
)
|