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)
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)
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)
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)
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)
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)
def link(label, url="", **attrs): return link_to(label, tgurl(url), **attrs)
def link(label, url='', **attrs): return link_to(label, tgurl(url), **attrs)