Removed usage of string-based url() in auth docs.
This commit is contained in:
parent
3f2de80318
commit
58665dded0
|
@ -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
|
If you want more control over your URLs, you can reference a specific view in
|
||||||
your URLconf::
|
your URLconf::
|
||||||
|
|
||||||
|
from django.contrib.auth import views as auth_views
|
||||||
|
|
||||||
urlpatterns = [
|
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
|
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 = [
|
urlpatterns = [
|
||||||
url(
|
url(
|
||||||
'^change-password/',
|
'^change-password/',
|
||||||
'django.contrib.auth.views.password_change',
|
auth_views.password_change,
|
||||||
{'template_name': 'change-password.html'}
|
{'template_name': 'change-password.html'}
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue