Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #7274 -- Improved the django.contrib.auth password_reset() view…

… not to require the Sites framework. Thanks, joshrl

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7748 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 54f7da3a27b12d35373e384ca4b1b27fa3bd1482 1 parent 2b926d4
Adrian Holovaty authored June 26, 2008

Showing 1 changed file with 4 additions and 1 deletion. Show diff stats Hide diff stats

  1. 5  django/contrib/auth/views.py
5  django/contrib/auth/views.py
@@ -75,7 +75,10 @@ def password_reset(request, is_admin_site=False, template_name='registration/pas
75 75
             if is_admin_site:
76 76
                 form.save(domain_override=request.META['HTTP_HOST'])
77 77
             else:
78  
-                form.save(email_template_name=email_template_name)
  78
+                if Site._meta.installed:
  79
+                    form.save(email_template_name=email_template_name)
  80
+                else:
  81
+                    form.save(domain_override=RequestSite(request).domain, email_template_name=email_template_name)
79 82
             return HttpResponseRedirect('%sdone/' % request.path)
80 83
     return render_to_response(template_name, {'form': oldforms.FormWrapper(form, new_data, errors)},
81 84
         context_instance=RequestContext(request))

0 notes on commit 54f7da3

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