diff options
| author | Tom Christie | 2014-09-26 14:39:20 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-09-26 14:39:20 +0100 |
| commit | ac71d9aaae27f620fdb0167a4ad586e754a844a3 (patch) | |
| tree | 15c19362b95cc72f104f1d41a6799399ba97d36f /docs/tutorial/5-relationships-and-hyperlinked-apis.md | |
| parent | 609014460861fdfe82054551790d6439292dde7b (diff) | |
| parent | 411511622d163ad81720651869b80dc9de526d65 (diff) | |
| download | django-rest-framework-ac71d9aaae27f620fdb0167a4ad586e754a844a3.tar.bz2 | |
Merge master
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 |
