def get_xqueue_callback_url_prefix(request):
 prefix = '{proto}://{host}'.format(proto=request.META.get('HTTP_X_FORWARDED_PROTO', ('https' if request.is_secure() else 'http')), host=request.get_host())
 return settings.XQUEUE_INTERFACE.get('callback_url', prefix)

def get_xqueue_callback_url_prefix ( request ) : prefix = '{proto}://{host}' . format ( proto = request . META . get ( 'HTTP_X_FORWARDED_PROTO' , ( 'https' if request . is_secure ( ) else 'http' ) ) , host = request . get_host ( ) ) return settings . XQUEUE_INTERFACE . get ( 'callback_url' , prefix )
calculates default prefix based on request .