aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide/format-suffixes.md
diff options
context:
space:
mode:
authorTom Christie2014-09-24 09:02:53 +0100
committerTom Christie2014-09-24 09:02:53 +0100
commit4ffae7c0e959e42fa2dde830ac144e94ee8aae71 (patch)
treeeb878800eb479fdf072b8315282ec2b1fdea8ba2 /docs/api-guide/format-suffixes.md
parent8495cd898a5d34f00858a379b54e39cd19ded215 (diff)
parentda385c9c1f9deeeefd705154a6e6612d6d62f41b (diff)
downloaddjango-rest-framework-4ffae7c0e959e42fa2dde830ac144e94ee8aae71.tar.bz2
Merge pull request #1899 from collinanderson/urls
Remove patterns and strings from urls in tutorial.
Diffstat (limited to 'docs/api-guide/format-suffixes.md')
-rw-r--r--docs/api-guide/format-suffixes.md13
1 files changed, 7 insertions, 6 deletions
diff --git a/docs/api-guide/format-suffixes.md b/docs/api-guide/format-suffixes.md
index 529738e3..76a3367b 100644
--- a/docs/api-guide/format-suffixes.md
+++ b/docs/api-guide/format-suffixes.md
@@ -26,12 +26,13 @@ Arguments:
Example:
from rest_framework.urlpatterns import format_suffix_patterns
-
- urlpatterns = patterns('blog.views',
- url(r'^/$', 'api_root'),
- url(r'^comments/$', 'comment_list'),
- url(r'^comments/(?P<pk>[0-9]+)/$', 'comment_detail')
- )
+ from blog import views
+
+ urlpatterns = [
+ url(r'^/$', views.apt_root),
+ url(r'^comments/$', views.comment_list),
+ url(r'^comments/(?P<pk>[0-9]+)/$', views.comment_detail)
+ ]
urlpatterns = format_suffix_patterns(urlpatterns, allowed=['json', 'html'])