Skip to content

Commit

Permalink
newforms-admin: Custom form for changing a user's password now sets r…
Browse files Browse the repository at this point in the history
…oot_path manually (it doesn't have access to an AdminSite instance so it has to roll its own)

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7639 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
Simon Willison committed Jun 15, 2008
1 parent e8cd408 commit c6a2603
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django/contrib/auth/views.py
Expand Up @@ -10,6 +10,7 @@
from django.utils.html import escape
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
import re

def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME):
"Displays the login form and handles the login action."
Expand Down Expand Up @@ -124,4 +125,5 @@ def user_change_password(request, id):
'original': user,
'save_as': False,
'show_save': True,
'root_path': re.sub('auth/user/(\d+)/password/$', '', request.path),
}, context_instance=RequestContext(request))

0 comments on commit c6a2603

Please sign in to comment.