[Grok-dev] my modest Trails implementation

Brandon Craig Rhodes brandon at rhodesmill.org
Mon Oct 1 14:03:03 EDT 2007

Since I see the idea of "Trails" on the list of Sprint topics, but
have not had time to create a "megrok.trails" in the last week, I'd
better just share the code here in case any of the sprinters want to
look at it or have it as a starting point.

If you put the attached trails.py in your project, you can use it like

    from trails import TrailHead, Trail

    class MyTrailHead(TrailHead):
        trails = [
           Trail('/people/:id', Person),
           Trail('/account/:username', Account),
           Trail('/calendar/:year/:month, MonthCalendar),


-------------- next part --------------
A non-text attachment was scrubbed...
Name: trails.py
Type: text/x-python
Size: 2779 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20071001/32f6db48/trails.py
-------------- next part --------------

Brandon Craig Rhodes   brandon at rhodesmill.org   http://rhodesmill.org/brandon

More information about the Grok-dev mailing list