diff -r 1ac6a1e1e429 -r e440e94a874b app/soc/logic/helper/notifications.py --- a/app/soc/logic/helper/notifications.py Mon Sep 07 20:07:58 2009 +0200 +++ b/app/soc/logic/helper/notifications.py Mon Sep 07 20:26:39 2009 +0200 @@ -22,6 +22,7 @@ ] +import os import time from django.template import loader @@ -33,7 +34,6 @@ from soc.logic import accounts from soc.logic import dicts from soc.logic import mail_dispatcher -from soc.logic import system from soc.views.helper import redirects @@ -81,7 +81,7 @@ to_user = user_logic.getForFields(properties, unique=True) invitation_url = "http://%(host)s%(index)s" % { - 'host' : system.getHostname(), + 'host' : os.environ['HTTP_HOST'], 'index': redirects.getInviteProcessRedirect(entity, None), } @@ -164,7 +164,7 @@ url = "http://%(host)s%(redirect)s" % { 'redirect': redirects.getApplicantRedirect(entity, {'url_name': params['group_url_name']}), - 'host': system.getHostname(), + 'host': os.environ['HTTP_HOST'], } message_properties = { @@ -269,7 +269,7 @@ # create the url to show this notification notification_url = "http://%(host)s%(index)s" % { - 'host' : system.getHostname(), + 'host' : os.environ['HTTP_HOST'], 'index': redirects.getPublicRedirect(notification_entity, notification_view.getParams())} @@ -340,7 +340,7 @@ 'name': user_entity.name }, 'site_name': site_name, - 'site_location': 'http://%s' % system.getHostname(), + 'site_location': 'http://%s' % os.environ['HTTP_HOST'], } # send out the message using the default welcome template