# HG changeset patch # User Sverre Rabbelier # Date 1252346555 -7200 # Node ID abb1e88f98535362dfa45cc9b2f1badc0510376d # Parent fda118f512644e4645aa6eb52c4279c5dfba076d Add a getHostname to system It is better to abstract how we retrieve the hostname than to access it directly (see also getAppVersion). diff -r fda118f51264 -r abb1e88f9853 app/soc/logic/system.py --- a/app/soc/logic/system.py Sat Sep 05 15:56:19 2009 +0200 +++ b/app/soc/logic/system.py Mon Sep 07 20:02:35 2009 +0200 @@ -26,6 +26,12 @@ import settings +def getHostname(): + """Returns the hostname + """ + + return os.environ.get('HTTP_HOST') + def getAppVersion(): """Returns the Google App Engine "version" of the running instance. """