[Checkins] SVN: megrok.trails/trunk/src/megrok/trails/components.py
Thanks to the grok.baseclass() directive,
got rid of a dummy context.
Brandon Rhodes
brandon at rhodesmill.org
Thu Jul 17 18:23:08 EDT 2008
Log message for revision 88467:
Thanks to the grok.baseclass() directive, got rid of a dummy context.
Changed:
U megrok.trails/trunk/src/megrok/trails/components.py
-=-
Modified: megrok.trails/trunk/src/megrok/trails/components.py
===================================================================
--- megrok.trails/trunk/src/megrok/trails/components.py 2008-07-17 21:29:42 UTC (rev 88466)
+++ megrok.trails/trunk/src/megrok/trails/components.py 2008-07-17 22:23:07 UTC (rev 88467)
@@ -141,16 +141,6 @@
return grok.url(request, grok.getSite()) + '/' + '/'.join(parts)
-class _Dummy(object):
- """Dummy class.
-
- We cannot define a subclass of grok.Traverser without the
- Traverser grokker getting all upset about its needing to declare a
- context, so this Dummy class servers as the context for the
- TrailHead class. Each time users actually subclass TrailHead
- themselves, they will define their own context.
- """
-
class TrailHead(grok.Traverser):
"""Dispatch URLs to a collection of trails.
@@ -164,7 +154,7 @@
variable named ``trails`` that lists one or more Trail objects.
"""
- grok.context(_Dummy)
+ grok.baseclass()
def traverse(self, name):
namelist = [ name ]
More information about the Checkins
mailing list