diff options
| author | Tom Christie | 2014-09-24 09:02:53 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-09-24 09:02:53 +0100 |
| commit | 4ffae7c0e959e42fa2dde830ac144e94ee8aae71 (patch) | |
| tree | eb878800eb479fdf072b8315282ec2b1fdea8ba2 /docs/tutorial/4-authentication-and-permissions.md | |
| parent | 8495cd898a5d34f00858a379b54e39cd19ded215 (diff) | |
| parent | da385c9c1f9deeeefd705154a6e6612d6d62f41b (diff) | |
| download | django-rest-framework-4ffae7c0e959e42fa2dde830ac144e94ee8aae71.tar.bz2 | |
Merge pull request #1899 from collinanderson/urls
Remove patterns and strings from urls in tutorial.
Diffstat (limited to 'docs/tutorial/4-authentication-and-permissions.md')
| -rw-r--r-- | docs/tutorial/4-authentication-and-permissions.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/tutorial/4-authentication-and-permissions.md b/docs/tutorial/4-authentication-and-permissions.md index 74ad9a55..9120e254 100644 --- a/docs/tutorial/4-authentication-and-permissions.md +++ b/docs/tutorial/4-authentication-and-permissions.md @@ -137,10 +137,10 @@ Add the following import at the top of the file: And, at the end of the file, add a pattern to include the login and logout views for the browsable API. - urlpatterns += patterns('', + urlpatterns += [ url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), - ) + ] The `r'^api-auth/'` part of pattern can actually be whatever URL you want to use. The only restriction is that the included urls must use the `'rest_framework'` namespace. |
