diff -r fee8732830f7 -r e8d86272e6ea app/soc/logic/helper/notifications.py --- a/app/soc/logic/helper/notifications.py Mon Sep 07 20:02:35 2009 +0200 +++ b/app/soc/logic/helper/notifications.py Mon Sep 07 20:06:27 2009 +0200 @@ -22,7 +22,6 @@ ] -import os import time from django.template import loader @@ -34,6 +33,7 @@ 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' : os.environ['HTTP_HOST'], + 'host' : system.getHostname(), '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': os.environ['HTTP_HOST'], + 'host': system.getHostname(), } message_properties = { @@ -269,7 +269,7 @@ # create the url to show this notification notification_url = "http://%(host)s%(index)s" % { - 'host' : os.environ['HTTP_HOST'], + 'host' : system.getHostname(), 'index': redirects.getPublicRedirect(notification_entity, notification_view.getParams())} @@ -340,7 +340,7 @@ 'name': user_entity.name }, 'site_name': site_name, - 'site_location': 'http://%s' % os.environ['HTTP_HOST'], + 'site_location': 'http://%s' % system.getHostname(), } # send out the message using the default welcome template