Exemple #1
0
def make_login_url():
    url = "/login"
    params = {"came_from": request.environ["PATH_INFO"]}
    qualified = False
    try:
        url = config.login.url
        qualified = config.login.qualified
        if config.login.referrer_key:
            params = {config.login.referrer_key: tgurl(request.environ["PATH_INFO"], qualified=qualified)}
    except:  # pragma: no cover
        pass
    return tgurl(url, params)
Exemple #2
0
def make_logout_url():
    url = "/logout_handler"
    params = {}
    qualified = False
    try:
        url = config.logout.url
        qualified = config.logout.qualified
        if config.logout.referrer_key:
            params = {config.logout.referrer_key: tgurl(request.environ["PATH_INFO"], qualified=qualified)}
    except:  # pragma: no cover
        pass
    return tgurl(url, params=params)
Exemple #3
0
def make_logout_url():
    url = '/logout_handler'
    params = {}
    qualified = False
    try:
        url = config.logout.url
        qualified = config.logout.qualified
        if config.logout.referrer_key:
            params = {config.logout.referrer_key: tgurl(request.environ['PATH_INFO'], qualified=qualified)}
    except:
        pass
    return tgurl(url, params=params)
Exemple #4
0
def make_login_url():
    url = '/login'
    params = {'came_from': request.environ['PATH_INFO']}
    qualified = False
    try:
        url = config.login.url
        qualified = config.login.qualified
        if config.login.referrer_key:
            params = {config.login.referrer_key: tgurl(request.environ['PATH_INFO'], qualified=qualified)}
    except:
        pass
    return tgurl(url, params)
Exemple #5
0
def make_logout_url():
    url = '/logout_handler'
    params = {}
    qualified = False
    try:
        url = config.logout.url
        qualified = config.logout.qualified
        if config.logout.referrer_key:
            params = {
                config.logout.referrer_key:
                tgurl(request.environ['PATH_INFO'], qualified=qualified)
            }
    except:  # pragma: no cover
        pass
    return tgurl(url, params=params)
Exemple #6
0
def make_login_url():
    url = '/login'
    params = {'came_from': request.environ['PATH_INFO']}
    qualified = False
    try:
        url = config.login.url
        qualified = config.login.qualified
        if config.login.referrer_key:
            params = {
                config.login.referrer_key:
                tgurl(request.environ['PATH_INFO'], qualified=qualified)
            }
    except:  # pragma: no cover
        pass
    return tgurl(url, params)
Exemple #7
0
def link(label, url="", **attrs):
    return link_to(label, tgurl(url), **attrs)
Exemple #8
0
def link(label, url='', **attrs):
    return link_to(label, tgurl(url), **attrs)