app/soc/views/models/org_app.py
changeset 2871 e440e94a874b
parent 2867 e8d86272e6ea
child 2879 cb0f9b4646aa
--- a/app/soc/views/models/org_app.py	Mon Sep 07 20:07:58 2009 +0200
+++ b/app/soc/views/models/org_app.py	Mon Sep 07 20:26:39 2009 +0200
@@ -22,6 +22,8 @@
   ]
 
 
+import os
+
 from django import forms
 from django.utils import simplejson
 
@@ -30,7 +32,6 @@
 from soc.logic import dicts
 from soc.logic import mail_dispatcher
 from soc.logic import models as model_logic
-from soc.logic import system
 from soc.logic.models import program as program_logic
 from soc.logic.models import org_app as org_app_logic
 from soc.views import helper
@@ -238,7 +239,7 @@
         # use the accepted template and subject
         template = params['accepted_mail_template']
         context['subject'] = 'Congratulations!'
-        context['HTTP_host'] = 'http://%s' % (system.getHostname())
+        context['HTTP_host'] = 'http://%s' % (os.environ['HTTP_HOST'])
       elif status == 'rejected':
         # use the rejected template and subject
         template = params['rejected_mail_template']