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.
from django.dispatch import Signalrequest_started = Signal()request_finished = Signal()got_request_exception = Signal(providing_args=["request"])