|Version 2 (modified by 11 years ago) (diff),|
Notice: This plugin is unmaintained and available for adoption.
Interface for using Nevow Stan templates in Trac Plugins
If you have any issues, create a new ticket.
Download the zipped source from [download:tracistanplugin 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')
- 16397 by rjollos on 2017-03-25 09:37:00
Remove obsolete "0.9" code
- 1081 by pacopablo on 2006-08-02 18:36:02
Add setup.cfg so that the resulting egg is tagged with the revision number and marked as dev
- 1080 by pacopablo on 2006-08-02 18: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
TracIStanand then create a
[tracistan]section and set the
default_handleroption to the name of the object that implements
IStanRequestHandlerinterface. For example:
[trac] default_handler = TracIStan [tracistan] default_handler = MyStanPlugin