|Version 2 (modified by pacopablo, 8 years ago) (diff)|
Interface for using Nevow Stan templates in Trac Plugins
If you have any issues, create a new ticket.
Download the zipped source from here.
TracIStan 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.
from tracistan import TracIStan class TestStan(TracIStan): """A simple test class illustrating usage""" def match_request(self, req): """For the sake of completeness, let's match someting""" return req.path_info == '/test' def process_request(self, req): """Here is where one would process all the yummy stuff""" # do some stuff here return self._return(req, 'template.stan')
-  by pacopablo on 2006-08-02 20:36:02
Add setup.cfg so that the resulting egg is tagged with the revision number and marked as dev
-  by pacopablo on 2006-08-02 20:33:52
- Added support for passing different structures to include()
- Added support for using a TracIStan plugin as the default_handler. To do so, set the default_handler to TracIStan and then create a [tracistan] section and set the default_handler option to the name of the object that implements IStanRequestHandler interface. For example:
[trac] default_handler = TracIStan [tracistan] default_handler = MyStanPlugin
-  by pacopablo on 2006-07-25 19:34:58