Changes between Version 1 and Version 2 of TraciStanPlugin


Ignore:
Timestamp:
Apr 21, 2006 5:53:37 PM (8 years ago)
Author:
pacopablo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TraciStanPlugin

    v1 v2  
    2525TracIStan wraps the IRequestHandler interface to allow for using Stan templates.  To use it, simply subclass TracIStan and return a call to its {{{_return(req, 'template', 'text/html')}}} method. 
    2626{{{ 
     27#!python 
    2728from tracistan import TracIStan 
    2829 
    2930class TestStan(TracIStan): 
     31    """A simple test class illustrating usage""" 
    3032 
    3133    def match_request(self, req): 
     34        """For the sake of completeness, let's match someting""" 
    3235        return req.path_info == '/test' 
    3336 
    3437    def process_request(self, req): 
     38        """Here is where one would process all the yummy stuff""" 
    3539 
    3640        # do some stuff here 
     41 
    3742        return self._return(req, 'template.stan') 
    3843}}}