1
0
mirror of https://github.com/django/django.git synced 2025-07-04 01:39:20 +00:00

newforms-admin: Added password_change() and password_change_done() hooks to AdminSite

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4643 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-02-28 06:04:46 +00:00
parent 95e10baff2
commit 1f8d36bb5a

View File

@ -105,8 +105,20 @@ class AdminSite(object):
url = url.rstrip('/') # Trim trailing slash, if it exists.
if url == '':
return self.index(request)
elif url == 'password_change':
return self.password_change(request)
elif url == 'password_change/done':
return self.password_change_done(request)
raise NotImplementedError('Only the admin index page is implemented.')
def password_change(self, request):
from django.contrib.auth.views import password_change
return password_change(request)
def password_change_done(self, request):
from django.contrib.auth.views import password_change_done
return password_change_done(request)
def login(self, request):
"""
Displays the login form for the given HttpRequest.