Esempio n. 1
0
def logPageException(req: Request, message: str) -> None:
    """Logs an exception that occurred while handling a page request.
    """
    logging.exception(
        '%s:\n%s %s\n%s', message, req.method, req.getURL(),
        getattr(req, 'args', '(before or during argument parsing)'))
Esempio n. 2
0
def logoutURL(req: Request) -> str:
    """Returns a URL of the Logout page, so that it returns to the request's
    URL after the user has logged out.
    """
    return pageURL('Logout', URLArgs(url=req.getURL()))