Use system.getHostname() everywhere
Replace os.environ['HTTP_HOST'] with system.getHostname(), as a
result we do not crash when 'HTTP_HOST' is unset now.
"Decorator for views that gzips pages if the client supports it."
from django.utils.decorators import decorator_from_middleware
from django.middleware.gzip import GZipMiddleware
gzip_page = decorator_from_middleware(GZipMiddleware)