From 9d5c45beaedab20f1bdb71e9052aa1813ce01fe8 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Wed, 17 Jun 2015 09:45:03 -0400 Subject: [PATCH] [1.8.x] Removed usage of string-based url() in auth docs. Backport of 58665dded006a4bbb9789e92cd280265a4f3dee8 from master --- docs/topics/auth/default.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/topics/auth/default.txt b/docs/topics/auth/default.txt index fce77733d3..9a5ebd5454 100644 --- a/docs/topics/auth/default.txt +++ b/docs/topics/auth/default.txt @@ -723,8 +723,10 @@ documentation ` 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 @@ -735,7 +737,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'} ) ]