aboutsummaryrefslogtreecommitdiffstats
path: root/docs/tutorial/2-requests-and-responses.md
diff options
context:
space:
mode:
authorTom Christie2014-09-26 14:39:20 +0100
committerTom Christie2014-09-26 14:39:20 +0100
commitac71d9aaae27f620fdb0167a4ad586e754a844a3 (patch)
tree15c19362b95cc72f104f1d41a6799399ba97d36f /docs/tutorial/2-requests-and-responses.md
parent609014460861fdfe82054551790d6439292dde7b (diff)
parent411511622d163ad81720651869b80dc9de526d65 (diff)
downloaddjango-rest-framework-ac71d9aaae27f620fdb0167a4ad586e754a844a3.tar.bz2
Merge master
Diffstat (limited to 'docs/tutorial/2-requests-and-responses.md')
-rw-r--r--docs/tutorial/2-requests-and-responses.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/tutorial/2-requests-and-responses.md b/docs/tutorial/2-requests-and-responses.md
index e70bbbfc..136b0135 100644
--- a/docs/tutorial/2-requests-and-responses.md
+++ b/docs/tutorial/2-requests-and-responses.md
@@ -110,11 +110,12 @@ Now update the `urls.py` file slightly, to append a set of `format_suffix_patter
from django.conf.urls import patterns, url
from rest_framework.urlpatterns import format_suffix_patterns
+ from snippets import views
- urlpatterns = patterns('snippets.views',
- url(r'^snippets/$', 'snippet_list'),
- url(r'^snippets/(?P<pk>[0-9]+)$', 'snippet_detail'),
- )
+ urlpatterns = [
+ url(r'^snippets/$', views.snippet_list),
+ url(r'^snippets/(?P<pk>[0-9]+)$', views.snippet_detail),
+ ]
urlpatterns = format_suffix_patterns(urlpatterns)