From dd14c6c88ba210bac8349041b8db486576539249 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 3 Nov 2014 11:21:29 +0000 Subject: Latest docs release --- api-guide/format-suffixes.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'api-guide/format-suffixes.html') diff --git a/api-guide/format-suffixes.html b/api-guide/format-suffixes.html index 47ed1a5c..0531f75c 100644 --- a/api-guide/format-suffixes.html +++ b/api-guide/format-suffixes.html @@ -219,12 +219,13 @@ used all the time.

Example:

from rest_framework.urlpatterns import format_suffix_patterns
+from blog import views
 
-urlpatterns = patterns('blog.views',
-    url(r'^/$', 'api_root'),
-    url(r'^comments/$', 'comment_list'),
-    url(r'^comments/(?P<pk>[0-9]+)/$', 'comment_detail')
-)
+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'])
 
-- cgit v1.2.3