def determine_transport(url, transports=default_transports):
    url_components = urlparse.urlparse(url)
    scheme = url_components.scheme.lower()
    netloc = url_components.netloc

    if not scheme:
        raise TransportError("URL missing scheme '%s'." % url)

    if not netloc:
        raise TransportError("URL missing hostname '%s'." % url)

    for transport in transports:
        if scheme in transport.schemes:
            return transport

    raise TransportError("Unsupported URL scheme '%s'." % scheme)
Executes the SQL needed to install django-watson.
dataset/ETHPy150Open core-api/python-client/coreapi/transports/__init__.py/determine_transport--crossover with--dataset/ETHPy150Open etianen/django-watson/src/watson/backends.py/SearchBackend.do_install