def find_redirect(key):
 rv = (get_url(session.pop(key.lower(), None)) or get_url((current_app.config[key.upper()] or None)) or '/')
 return rv

def find_redirect ( key ) : rv = ( get_url ( session . pop ( key . lower ( ) , None ) ) or get_url ( ( current_app . config [ key . upper ( ) ] or None ) ) or '/' ) return rv
returns the url to redirect to after a user logs in successfully .