app/soc/views/models/program.py
changeset 2867 e8d86272e6ea
parent 2856 f446e019825c
child 2871 e440e94a874b
--- a/app/soc/views/models/program.py	Mon Sep 07 20:02:35 2009 +0200
+++ b/app/soc/views/models/program.py	Mon Sep 07 20:06:27 2009 +0200
@@ -25,8 +25,6 @@
   ]
 
 
-import os
-
 from django import forms
 from django import http
 from django.utils.translation import ugettext
@@ -34,6 +32,7 @@
 from soc.logic import allocations
 from soc.logic import cleaning
 from soc.logic import dicts
+from soc.logic import system
 from soc.logic.helper import timeline as timeline_helper
 from soc.logic.models import host as host_logic
 from soc.logic.models import mentor as mentor_logic
@@ -416,7 +415,7 @@
     contents = [content]
 
     return_url =  "http://%(host)s%(index)s" % {
-      'host' : os.environ['HTTP_HOST'],
+      'host' : system.getHostname(),
       'index': redirects.getSlotsRedirect(program, params)
       }