old_contents: from django.http import HttpResponse
  import datetime
  
  def ping(request):
      import socket
      now = datetime.datetime.now()
      me = socket.gethostbyname(socket.gethostname())
      you = request.get_host()
      html = "%s: %s %s" % (now, me, you)
      return HttpResponse(html)
  
new_contents: from django.http import HttpResponse
  import datetime
  
  def ping(request):
      import socket
      now = datetime.datetime.now()
      me = "%s(%s)" % (
          request.META['SERVER_NAME'],
          "%s:%s"%(
              socket.gethostbyname(
                  request.META['SERVER_NAME'],
                  request.META['SERVER_PORT']))
      you = "%s(%s)" % (
          request.META['REMOTE_HOST'],
          request.META['REMOTE_ADDR'])
      html = "%s: %s %s" % (
          now,
          me,
          you)
      return HttpResponse(html)
  
subject: rewrite ping format