mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-12-03 06:54:05 +03:00
10 lines
484 B
Python
10 lines
484 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_id>[^/]+)/comments/$', Comments.as_view(), name='comments'),
|
|
url(r'^(?P<blogpost>[^/]+)/comments/(?P<id>[^/]+)/$', CommentInstance.as_view(), name='comment'),
|
|
)
|