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/5-relationships-and-hyperlinked-apis.md | |
| parent | 8495cd898a5d34f00858a379b54e39cd19ded215 (diff) | |
| download | django-rest-framework-da385c9c1f9deeeefd705154a6e6612d6d62f41b.tar.bz2 | |
remove patterns and strings from urls #1898
Diffstat (limited to 'docs/tutorial/5-relationships-and-hyperlinked-apis.md')
| -rw-r--r-- | docs/tutorial/5-relationships-and-hyperlinked-apis.md | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/docs/tutorial/5-relationships-and-hyperlinked-apis.md b/docs/tutorial/5-relationships-and-hyperlinked-apis.md index 9c61fe3d..36473ce9 100644 --- a/docs/tutorial/5-relationships-and-hyperlinked-apis.md +++ b/docs/tutorial/5-relationships-and-hyperlinked-apis.md @@ -108,8 +108,8 @@ If we're going to have a hyperlinked API, we need to make sure we name our URL p  After adding all those names into our URLconf, our final `snippets/urls.py` file should look something like this:      # API endpoints -    urlpatterns = format_suffix_patterns(patterns('snippets.views', -        url(r'^$', 'api_root'), +    urlpatterns = format_suffix_patterns([ +        url(r'^$', views.api_root),          url(r'^snippets/$',              views.SnippetList.as_view(),              name='snippet-list'), @@ -125,13 +125,13 @@ After adding all those names into our URLconf, our final `snippets/urls.py` file          url(r'^users/(?P<pk>[0-9]+)/$',              views.UserDetail.as_view(),              name='user-detail') -    )) +    ])      # Login and logout views for the browsable API -    urlpatterns += patterns('', +    urlpatterns += [          url(r'^api-auth/', include('rest_framework.urls',                                     namespace='rest_framework')), -    ) +    ]  ## Adding pagination | 
