From c32ae6070f41e306dfe9532e1133ea88b476ffa8 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 25 Feb 2013 23:12:44 +0100 Subject: [PATCH] Fixed pluralization and slashes in urlpatterns example --- docs/api-guide/format-suffixes.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/api-guide/format-suffixes.md b/docs/api-guide/format-suffixes.md index 6d5feba42..4c7151263 100644 --- a/docs/api-guide/format-suffixes.md +++ b/docs/api-guide/format-suffixes.md @@ -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[0-9]+)/$', 'comment_instance') + url(r'^$', 'api_root'), + url(r'^comments$', 'comment_root'), + url(r'^comments/(?P[0-9]+)$', 'comment_instance') ) urlpatterns = format_suffix_patterns(urlpatterns, allowed=['json', 'html']) @@ -58,4 +58,4 @@ It is actually a misconception. For example, take the following quote from Roy The quote does not mention Accept headers, but it does make it clear that format suffixes should be considered an acceptable pattern. [cite]: http://tech.groups.yahoo.com/group/rest-discuss/message/5857 -[cite2]: http://tech.groups.yahoo.com/group/rest-discuss/message/14844 \ No newline at end of file +[cite2]: http://tech.groups.yahoo.com/group/rest-discuss/message/14844