diff options
| author | Tim Graham <timograham@gmail.com> | 2015-06-17 09:45:03 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-06-17 09:45:03 -0400 |
| commit | 58665dded006a4bbb9789e92cd280265a4f3dee8 (patch) | |
| tree | 9c0bab460f8fa6c35afdbd387cb1be60848dbdd7 /docs | |
| parent | 3f2de803181ca3c5526ec9d708b2098b8f683808 (diff) | |
Removed usage of string-based url() in auth docs.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/auth/default.txt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt index 9e2d549fd1..f04a266cd8 100644 --- a/docs/topics/auth/default.txt +++ b/docs/topics/auth/default.txt @@ -729,8 +729,10 @@ documentation </topics/http/urls>` for details on using named URL patterns. If you want more control over your URLs, you can reference a specific view in your URLconf:: + from django.contrib.auth import views as auth_views + urlpatterns = [ - url('^change-password/', 'django.contrib.auth.views.password_change') + url('^change-password/', auth_views.password_change) ] The views have optional arguments you can use to alter the behavior of the @@ -741,7 +743,7 @@ arguments in the URLconf, these will be passed on to the view. For example:: urlpatterns = [ url( '^change-password/', - 'django.contrib.auth.views.password_change', + auth_views.password_change, {'template_name': 'change-password.html'} ) ] |
