(viewname, params=None, absolute=False, **kwargs)
return url
>>> reverse('create_location', args=["test"], params={"selected": "foo"})
    '/a/test/settings/locations/new/?selected=foo'
>>> reverse('create_location', args=["test"], params={"selected": "foo"})
    '/a/test/settings/locations/new/?selected=foo'
>>> reverse ( create_location args = [ test ] params = { selected : foo } ) / a / test / settings / locations / new / ?selected = foo
def reverse(viewname, params=None, absolute=False, **kwargs):
    """
    >>> reverse('create_location', args=["test"], params={"selected": "foo"})
    '/a/test/settings/locations/new/?selected=foo'
    """
    url = _reverse(viewname, **kwargs)
    if absolute:
        url = "{}{}".format(get_url_base(), url)
    if params:
        url = "{}?{}".format(url, urlencode(params))
    return url
def reverse ( viewname , params = None , absolute = False , * * kwargs ) : url = _reverse ( viewname , * * kwargs ) if absolute : url = "{}{}" . format ( get_url_base ( ) , url ) if params : url = "{}?{}" . format ( url , urlencode ( params ) ) return url