[Zope3-dev] Move Introspector to zmi_actions
Stephan Richter
srichter at cosmos.phy.tufts.edu
Fri Jan 28 09:32:02 EST 2005
On Friday 28 January 2005 09:20, Roger Ineichen wrote:
> > In fact, I would claim to remove it. It poses no value
> > anymore. I would
> > instead have a context-sensitive Help link that points to the
> > API docs. I
> > know that some oppose this move, but I think it is the right
> > thing to do.
>
> Is there a easy way to add a context sensitive link?
> What do I have to call?
You basically create a generic view for all interfaces. The view then looks at
its context and does the right thing. For example:
class APIDocIntrospector(object):
def __init__(self, context, request):
self.context = context
self.request = request
def __call__(self):
klass = self.context.__class__
# SciFi, but you know what I mean
path = getApiDocPath(klass)
self.request.response.redirect(
'/++apidoc++/classmodule/%s/index.html' %path)
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-dev
mailing list