diff options
| author | Tom Christie | 2015-01-21 13:03:49 +0000 |
|---|---|---|
| committer | Tom Christie | 2015-01-21 13:03:49 +0000 |
| commit | 9d24809a4dee67ee414ee79820331f0794c42a13 (patch) | |
| tree | d9e246f0b6a9a6491370a392393e7d4c1a183889 /docs/api-guide | |
| parent | da6ef3d0b0f3a8e688524bbd446d4350a74fd05a (diff) | |
| parent | c0fa92e9adce47d8cde2c6dea4b1e30f64f5a92c (diff) | |
| download | django-rest-framework-9d24809a4dee67ee414ee79820331f0794c42a13.tar.bz2 | |
Merge branch 'master' of https://github.com/tomchristie/django-rest-framework
Diffstat (limited to 'docs/api-guide')
| -rw-r--r-- | docs/api-guide/routers.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/api-guide/routers.md b/docs/api-guide/routers.md index 3a8a8f6c..9c9bfb50 100644 --- a/docs/api-guide/routers.md +++ b/docs/api-guide/routers.md @@ -60,7 +60,7 @@ For example, you can append `router.urls` to a list of existing views… router.register(r'accounts', AccountViewSet) urlpatterns = [ - url(r'^forgot-password/$, ForgotPasswordFormView.as_view(), + url(r'^forgot-password/$', ForgotPasswordFormView.as_view(), ] urlpatterns += router.urls @@ -68,14 +68,14 @@ For example, you can append `router.urls` to a list of existing views… Alternatively you can use Django's `include` function, like so… urlpatterns = [ - url(r'^forgot-password/$, ForgotPasswordFormView.as_view(), + url(r'^forgot-password/$', ForgotPasswordFormView.as_view(), url(r'^', include(router.urls)) ] Router URL patterns can also be namespaces. urlpatterns = [ - url(r'^forgot-password/$, ForgotPasswordFormView.as_view(), + url(r'^forgot-password/$', ForgotPasswordFormView.as_view(), url(r'^api/', include(router.urls, namespace='api')) ] |
