def safe_get_host(request):
 if (isinstance(settings.ALLOWED_HOSTS, (list, tuple)) and ('*' not in settings.ALLOWED_HOSTS)):
  return request.get_host()
 else:
  return configuration_helpers.get_value('site_domain', settings.SITE_NAME)

def safe_get_host ( request ) : if ( isinstance ( settings . ALLOWED_HOSTS , ( list , tuple ) ) and ( '*' not in settings . ALLOWED_HOSTS ) ) : return request . get_host ( ) else : return configuration_helpers . get_value ( 'site_domain' , settings . SITE_NAME )
get the host name for this request .