use logger instead of print as often as possible
[myslice.git] / portal / joinview.py
index 0282e96..6f0d77c 100644 (file)
@@ -22,6 +22,7 @@ from portal.models              import PendingUser,PendingAuthority
 from portal.actions             import authority_get_pi_emails, manifold_add_user,manifold_add_account, create_pending_user
 
 from myslice.theme import ThemeView
+from myslice.settings import logger
 
 import activity.institution
 
@@ -173,7 +174,7 @@ class JoinView (FreeAccessView, ThemeView):
                     'user_hrn'      : user_hrn,
                     'pi'            : [reg_auth],
                     'auth_type'     : 'managed',
-                    'validation_link': 'http://' + current_site + '/portal/email_activation/'+ email_hash
+                    'validation_link': current_site + '/portal/email_activation/'+ email_hash
                 }
 
                 
@@ -229,9 +230,9 @@ class JoinView (FreeAccessView, ThemeView):
                     msg.send()
     
                 except Exception, e:
-                    print "Failed to send email, please check the mail templates and the SMTP configuration of your server"
+                    logger.error("Failed to send email, please check the mail templates and the SMTP configuration of your server")
                     import traceback
-                    traceback.print_exc()
+                    logger.error(traceback.format_exc())
 
                 self.template_name = 'join_complete.html'
                 # log institution activity