durusmail: quixote-users: Traversing objects without using _q_lookup
Traversing objects without using _q_lookup
2003-10-03
2003-10-03
Traversing objects without using _q_lookup
David Binger
2003-10-03
_q_exports = ['Foo']

class Foo:
     _q_exports = []
     def _q_index(self, request):
         return 'hello'
     _q_index = classmethod(_q_index)

I suppose that _q_index could create an instance of Foo if you need one
for
handling the request.  This would not be my first choice for a pattern,
but if you really want to traverse into classes, I think this will work.

On Friday, October 3, 2003, at 11:24 AM, Merrell, Brian L. wrote:
>
> David could you elaborate on using a classmethod for _q_index.  If it
> has
> already been posted I would be happy to search the mail archives.


reply