diff options
| author | Collin Anderson | 2014-09-23 17:08:38 -0400 | 
|---|---|---|
| committer | Collin Anderson | 2014-09-23 17:10:02 -0400 | 
| commit | da385c9c1f9deeeefd705154a6e6612d6d62f41b (patch) | |
| tree | eb878800eb479fdf072b8315282ec2b1fdea8ba2 /docs/tutorial/2-requests-and-responses.md | |
| parent | 8495cd898a5d34f00858a379b54e39cd19ded215 (diff) | |
| download | django-rest-framework-da385c9c1f9deeeefd705154a6e6612d6d62f41b.tar.bz2 | |
remove patterns and strings from urls #1898
Diffstat (limited to 'docs/tutorial/2-requests-and-responses.md')
| -rw-r--r-- | docs/tutorial/2-requests-and-responses.md | 9 | 
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) | 
