def home(request):
    """Try to connect to database, and list available examples."""
    try:
        DBSession.query(User).first()
    except DBAPIError:
        return Response(
            conn_err_msg,
            content_type="text/plain",
            status_int=500,
        )

    return {"project": "pyramid_tut"}
def home ( request ) : try : DBSession . query ( User ) . first ( ) except DBAPIError : return Response ( conn_err_msg , content_type = "text/plain" , status_int = 500 , ) return { "project" : "pyramid_tut" }
Try to connect to database, and list available examples.