Version 3 (modified by pacopablo, 11 years ago) (diff)




Interface for using Nevow Stan templates in Trac Plugins

Bugs/Feature Requests

Existing bugs and feature requests for TraciStanPlugin are here.

If you have any issues, create a new ticket.


Download the zipped source from [download:tracistanplugin here].


You can check out TraciStanPlugin from here using Subversion, or browse the source with Trac.


TracIStan wraps the IRequestHandler interface to allow for using Stan templates.

To use it:

  • Subclass TracIStan
  • Set template data in req.standata (a dict)
  • Return a call to self._return(req, 'template', 'text/html') in the process_request 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')

Recent Changes

1081 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

1080 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:
    default_handler = TracIStan
    default_handler = MyStanPlugin
1061 by pacopablo on 2006-07-25 19:34:58

0.9 branch



Author: pacopablo