mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 08:29:59 +03:00
Fixed pluralization and slashes in urlpatterns example
This commit is contained in:
parent
8da83f0df9
commit
c32ae6070f
|
@ -28,9 +28,9 @@ Example:
|
|||
from rest_framework.urlpatterns import format_suffix_patterns
|
||||
|
||||
urlpatterns = patterns('blog.views',
|
||||
url(r'^/$', 'api_root'),
|
||||
url(r'^comment/$', 'comment_root'),
|
||||
url(r'^comment/(?P<pk>[0-9]+)/$', 'comment_instance')
|
||||
url(r'^$', 'api_root'),
|
||||
url(r'^comments$', 'comment_root'),
|
||||
url(r'^comments/(?P<pk>[0-9]+)$', 'comment_instance')
|
||||
)
|
||||
|
||||
urlpatterns = format_suffix_patterns(urlpatterns, allowed=['json', 'html'])
|
||||
|
|
Loading…
Reference in New Issue
Block a user