# HG changeset patch # User Sverre Rabbelier # Date 1252346555 -7200 # Node ID fee8732830f72144d79a4af0737f55aee47416e5 # Parent 150b42dac7c40127f90e7208c112e4725c492c2d 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 150b42dac7c4 -r fee8732830f7 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. """