OpenQuizz
Une application de gestion des contenus pédagogiques
DebuggedApplication Class Reference
Inheritance diagram for DebuggedApplication:
Collaboration diagram for DebuggedApplication:

Public Member Functions

def __init__ (self, app, evalex=False, request_key="werkzeug.request", console_path="/console", console_init_func=None, show_hidden_frames=False, pin_security=True, pin_logging=True)
 
def pin (self)
 
def pin (self, value)
 
def pin_cookie_name (self)
 
def debug_application (self, environ, start_response)
 
def execute_command (self, request, command, frame)
 
def display_console (self, request)
 
def paste_traceback (self, request, traceback)
 
def get_resource (self, request, filename)
 
def check_pin_trust (self, environ)
 
def pin_auth (self, request)
 
def log_pin_request (self)
 
def __call__ (self, environ, start_response)
 

Data Fields

 app
 
 evalex
 
 frames
 
 tracebacks
 
 request_key
 
 console_path
 
 console_init_func
 
 show_hidden_frames
 
 secret
 
 pin_logging
 
 pin
 

Detailed Description

Enables debugging support for a given application::

    from werkzeug.debug import DebuggedApplication
    from myapp import app
    app = DebuggedApplication(app, evalex=True)

The `evalex` keyword argument allows evaluating expressions in a
traceback's frame context.

:param app: the WSGI application to run debugged.
:param evalex: enable exception evaluation feature (interactive
               debugging).  This requires a non-forking server.
:param request_key: The key that points to the request object in ths
                    environment.  This parameter is ignored in current
                    versions.
:param console_path: the URL for a general purpose console.
:param console_init_func: the function that is executed before starting
                          the general purpose console.  The return value
                          is used as initial namespace.
:param show_hidden_frames: by default hidden traceback frames are skipped.
                           You can show them by setting this parameter
                           to `True`.
:param pin_security: can be used to disable the pin based security system.
:param pin_logging: enables the logging of the pin system.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  app,
  evalex = False,
  request_key = "werkzeug.request",
  console_path = "/console",
  console_init_func = None,
  show_hidden_frames = False,
  pin_security = True,
  pin_logging = True 
)

Member Function Documentation

◆ __call__()

def __call__ (   self,
  environ,
  start_response 
)
Dispatch the requests.

◆ check_pin_trust()

def check_pin_trust (   self,
  environ 
)
Checks if the request passed the pin test.  This returns `True` if the
request is trusted on a pin/cookie basis and returns `False` if not.
Additionally if the cookie's stored pin hash is wrong it will return
`None` so that appropriate action can be taken.

◆ debug_application()

def debug_application (   self,
  environ,
  start_response 
)
Run the application and conserve the traceback frames.

◆ display_console()

def display_console (   self,
  request 
)
Display a standalone shell.

◆ execute_command()

def execute_command (   self,
  request,
  command,
  frame 
)
Execute a command in a console.

◆ get_resource()

def get_resource (   self,
  request,
  filename 
)
Return a static resource from the shared folder.

◆ log_pin_request()

def log_pin_request (   self)
Log the pin if needed.

◆ paste_traceback()

def paste_traceback (   self,
  request,
  traceback 
)
Paste the traceback and return a JSON response.

◆ pin() [1/2]

def pin (   self)

◆ pin() [2/2]

def pin (   self,
  value 
)

◆ pin_auth()

def pin_auth (   self,
  request 
)
Authenticates with the pin.

◆ pin_cookie_name()

def pin_cookie_name (   self)
The name of the pin cookie.

Field Documentation

◆ app

app

◆ console_init_func

console_init_func

◆ console_path

console_path

◆ evalex

evalex

◆ frames

frames

◆ pin

pin

◆ pin_logging

pin_logging

◆ request_key

request_key

◆ secret

secret

◆ show_hidden_frames

show_hidden_frames

◆ tracebacks

tracebacks

The documentation for this class was generated from the following file: