1. Benoit Chesneau
  2. django-authopenid

Commits

bchesneau  committed c902ee9

[svn r34] fix issue 10.

  • Participants
  • Parent commits 7212041
  • Branches trunk

Comments (0)

Files changed (1)

File views.py

View file
 from django.contrib.sites.models import Site
 from django.utils.encoding import smart_str
 from django.utils.http import urlquote_plus, urlquote
+from django.core.mail import send_mail
 
 from openid.consumer.consumer import Consumer, \
     SUCCESS, CANCEL, FAILURE, SETUP_NEEDED
     consumer = Consumer(request.session, DjangoOpenIDStore())
     try:
         auth_request = consumer.begin(openid_url)
-    except DiscoveryFailure:
+    except:
         msg =_("The OpenID %s was invalid" % openid_url)
         return on_failure(request,msg)
 
             q.new_password=new_pw
             q.confirm_key = confirm_key
             q.save()
-            # send email
-            from django.core.mail import send_mail
+            # send email 
             current_domain = Site.objects.get_current().domain
             subject = _("Request for a new password")
             message_template = loader.get_template('authopenid/sendpw_email.txt')