The Oracle has the answer!

Alan Hoey - November 27th, 2008

Sometimes when writing things that poke into the deepest darkest corners of Plone (and also the more traditional, well lit corners) it’s nice to have some sort of rough guide to the area without having to trawl through pdb and the source code to find out what’s going on.

The Oracle helps by showing some of the more commonly needed information for objects all on one (rather large) page.  Some of the information included on the main page (@@the_oracle):

  • Authenticated User (id, type, roles, roles in context, attributes)
  • Context (id, type, path, methods (view source and call), attributes, source code)
  • Workflow history
  • AT Fields (id, type, required, mode, accessor, mutator)
  • Catalog Indexes/Metadata
  • Permissions

It also includes a quick method for dropping into pdb (@@pdb). To have a play just add teamrubber.theoracle to your buildout and enjoy!

Edit: Fixed a typo, thanks folks!

5 Responses to “The Oracle has the answer!”

  1. This is great! I’ve been thinking of starting a section for
    documenting rabbit holes, which is to say directions new or
    less-experienced developers should avoid because they’re not likely to
    yield any fruit. This tool would be very useful for such
    documentation: “Consult the foo section of @@the_oracle and if it says
    ‘bar’ then don’t bother debugging in that direction”. Between this
    and Gloworm we’re getting a pretty rich set of tools for helping to
    deal with the complexity of our stack.

  2. Alex Garel says:

    Sounds good, I will try it !

  3. Hanno Schulz says:

    Hi,
    this looks really great.
    But there is a small typo. It must be called with @@the_oracle and _not_ @@theoracle, like Ross Patterson wrote in his comment.

  4. Josip Delic says:

    Its amazing and so simple ;-)

  5. Bob says:

    Great tool – thanks!

Leave a Reply