mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-11 20:27:12 +03:00
10 lines
481 B
Python
10 lines
481 B
Python
from django.conf.urls.defaults import patterns, url
|
|
from blogpost.views import BlogPosts, BlogPostInstance, Comments, CommentInstance
|
|
|
|
urlpatterns = patterns('',
|
|
url(r'^$', BlogPosts.as_view(), name='blog-posts'),
|
|
url(r'^(?P<key>[^/]+)/$', BlogPostInstance.as_view(), name='blog-post'),
|
|
url(r'^(?P<blogpost>[^/]+)/comments/$', Comments.as_view(), name='comments'),
|
|
url(r'^(?P<blogpost>[^/]+)/comments/(?P<id>[^/]+)/$', CommentInstance.as_view(), name='comment'),
|
|
)
|