Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Moved 'User-requested password resets' docs from [17266] from auth do…

…cs to admin docs

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17305 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 103890561be52a074ef30c08d4ecc2d98066c259 1 parent f2dcca6
Adrian Holovaty authored
25  docs/ref/contrib/admin/index.txt
@@ -1928,6 +1928,31 @@ a pattern for your new view.
1928 1928
     be set to either ``self.name`` if your view is on an ``AdminSite`` or
1929 1929
     ``self.admin_site.name`` if your view is on a ``ModelAdmin``.
1930 1930
 
  1931
+.. _auth_password_reset:
  1932
+
  1933
+Adding a password-reset feature
  1934
+-------------------------------
  1935
+
  1936
+You can add a password-reset feature to the admin site by adding a few lines to
  1937
+your URLconf. Specifically, add these four patterns:
  1938
+
  1939
+.. code-block:: python
  1940
+
  1941
+    url(r'^admin/password_reset/$', 'django.contrib.auth.views.password_reset', name='admin_password_reset'),
  1942
+    (r'^admin/password_reset/done/$', 'django.contrib.auth.views.password_reset_done'),
  1943
+    (r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm'),
  1944
+    (r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete'),
  1945
+
  1946
+(This assumes you've added the admin at ``admin/`` and requires that you put
  1947
+the URLs starting with ``^admin/`` before the line that includes the admin app
  1948
+itself).
  1949
+
  1950
+.. versionchanged:: 1.4
  1951
+
  1952
+The presence of the ``admin_password_reset`` named URL will cause a "forgotten
  1953
+your password?" link to appear on the default admin log-in page under the
  1954
+password box.
  1955
+
1931 1956
 .. _admin-reverse-urls:
1932 1957
 
1933 1958
 Reversing admin URLs
28  docs/topics/auth.txt
@@ -371,34 +371,6 @@ Don't set the :attr:`~django.contrib.auth.models.User.password` attribute
371 371
 directly unless you know what you're doing. This is explained in the next
372 372
 section.
373 373
 
374  
-.. _auth_password_reset:
375  
-
376  
-User-requested password resets
377  
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
378  
-
379  
-There is a bundled reset mechanism that integrates into the admin, allowing
380  
-users to reset their passwords by email. It can be customized and is described
381  
-in detail below under :func:`~django.contrib.auth.views.password_reset`. To
382  
-enable it without customization, add lines something like the following to your
383  
-urls.py:
384  
-
385  
-.. code-block:: python
386  
-
387  
-    url(r'^admin/password_reset/$', 'django.contrib.auth.views.password_reset', name='admin_password_reset'),
388  
-    (r'^admin/password_reset/done/$', 'django.contrib.auth.views.password_reset_done'),
389  
-    (r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm'),
390  
-    (r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete'),
391  
-
392  
-(This assumes you've added the admin at ``admin/``, and requires that you put
393  
-the URLs starting with ``^admin/`` before the line that includes the admin app
394  
-itself).
395  
-
396  
-.. versionchanged:: 1.4
397  
-
398  
-The presence of the 'admin_password_reset' named URL will cause a "forgotten
399  
-your password?" link to appear on the default admin login page under the
400  
-password box.
401  
-
402 374
 .. _auth_password_storage:
403 375
 
404 376
 How Django stores passwords

0 notes on commit 1038905

Please sign in to comment.
Something went wrong with that request. Please try again.