Package trac :: Package web :: Module api :: Class IRequestHandler

Class IRequestHandler

source code

    object --+    
             |    
core.Interface --+
                 |
                IRequestHandler

Decide which trac.core.Component handles which Request, and how.

The boolean property is_valid_default_handler determines whether the IRequestFilter can be used as a default_handler and defaults to True. To be suitable as a default_handler, an IRequestFilter must return an HTML document and data dictionary for rendering the document, and must not require that match_request be called prior to process_request.

The boolean property jquery_noconflict determines whether jQuery's noConflict mode will be activated by the handler, and defaults to False.

Instance Methods
 
match_request(req)
Return whether the handler wants to process the given request.
source code
 
process_request(req)
Process the request.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

process_request(req)

source code 

Process the request.

Return a (template_name, data, content_type) tuple, where data is a dictionary of substitutions for the Genshi template.

"text/html" is assumed if content_type is None.

Note that if template processing should not occur, this method can simply send the response itself and not return anything.