HTTP_ORIGIN wasn't working on Firefox, changed it to get_host() instead
Scott Baker [Fri, 29 Aug 2014 19:32:46 +0000 (12:32 -0700)]
planetstack/core/models/user.py

index eec0927..6b5b061 100644 (file)
@@ -182,7 +182,7 @@ class User(AbstractBaseUser):
         self.set_password(password)\r
         subject, from_email, to = 'OpenCloud Account Credentials', 'support@opencloud.us', str(self.email)\r
         text_content = 'This is an important message.'\r
-        userUrl=get_request().META['HTTP_ORIGIN']\r
+        userUrl="http://%s/" % get_request().get_host()\r
         html_content = """<p>Your account has been created on OpenCloud. Please log in <a href="""+userUrl+""">here</a> to activate your account<br><br>Username: """+self.email+"""<br>Temporary Password: """+password+"""<br>Please change your password once you successully login into the site.</p>"""\r
         msg = EmailMultiAlternatives(subject,text_content, from_email, [to])\r
         msg.attach_alternative(html_content, "text/html")\r