Index of /ports/www/zope210/work/Zope-2.10.5-final/lib/python/zope/app/apidoc/browser

      Name                    Last modified       Size  Description

[DIR] Parent Directory 29-Oct-2007 06:39 - [   ] __init__.py 29-Oct-2007 06:09 1k [TXT] apidoc.css 29-Oct-2007 06:09 8k [   ] apidoc.py 29-Oct-2007 06:09 2k [   ] configure.zcml 29-Oct-2007 06:09 3k [   ] contents.pt 29-Oct-2007 06:09 1k [   ] details_macros.pt 29-Oct-2007 06:09 2k [   ] disabled.pt 29-Oct-2007 06:09 1k [   ] disabled.zcml 29-Oct-2007 06:09 1k [IMG] favicon.png 29-Oct-2007 06:09 1k [   ] ftests.py 29-Oct-2007 06:09 3k [IMG] harrow.png 29-Oct-2007 06:09 1k [   ] index.pt 29-Oct-2007 06:09 1k [   ] macros.py 29-Oct-2007 06:09 1k [   ] menu.pt 29-Oct-2007 06:09 1k [   ] menu_macros.pt 29-Oct-2007 06:09 3k [   ] modules.pt 29-Oct-2007 06:09 1k [TXT] nodevmode.txt 29-Oct-2007 06:09 1k [   ] notfound.pt 29-Oct-2007 06:09 1k [   ] prefIndex.pt 29-Oct-2007 06:09 3k [   ] preference.py 29-Oct-2007 06:09 2k [   ] prefmenu.pt 29-Oct-2007 06:09 2k [   ] skin.py 29-Oct-2007 06:09 1k [   ] static_contents.pt 29-Oct-2007 06:09 1k [   ] static_index.pt 29-Oct-2007 06:09 1k [   ] static_menu.pt 29-Oct-2007 06:09 1k [   ] static_menu_macros.pt 29-Oct-2007 06:09 4k [   ] static_modules.pt 29-Oct-2007 06:09 1k [   ] utilities.js 29-Oct-2007 06:09 5k [IMG] varrow.png 29-Oct-2007 06:09 1k

=====================
Generic API Doc Views
=====================

Get a browser started:

  >>> from zope.testbrowser.testing import Browser
  >>> browser = Browser()
  >>> browser.addHeader('Authorization', 'Basic mgr:mgrpw')


Not Found View
--------------

The `APIDOC` skin defines a custom not found view, since it fits the look and
feel better and does not have all the O-wrap clutter:

  >>> browser.open('http://localhost/++apidoc++/non-existent/')
  Traceback (most recent call last):
  ...
  HTTPError: HTTP Error 404: Not Found

  >>> from urllib2 import HTTPError
  >>> try:
  ...     browser.open('http://localhost/++apidoc++/non-existent/')
  ... except HTTPError, error:
  ...     pass

  >>> print browser.contents
  <...
  <h1 class="details-header">
    Page Not Found
  </h1>
  <BLANKLINE>
  <p>
    While broken links occur occassionally, they are considered bugs. Please
    report any broken link to
    <a href="mailto:zope3-dev@zope.org">zope3-dev@zope.org</a>.
  </p>
  ...