# quixote.demo.pages
#
# Provides miscellaneous pages for the Quixote demo (currently
# just the index page).

__revision__ = "$Id: pages.ptl,v 1.8 2002/04/29 19:16:52 nascheme Exp $"


template _q_index(request):
    print "debug message from the index page"
    package_name = '.'.join(__name__.split('.')[:-1])
    module_name = __name__
    module_file = __file__
    """
    <html>
    <head><title>Quixote Demo</title></head>
    <body>
    <h1>Hello, world!</h1>

    <p>(This page is generated by the index function for the
    <code>%(package_name)s</code> package.  This index function is
    actually a PTL template, <code>_q_index()</code>, in the
    <code>%(module_name)s</code> PTL module.  Look in %(module_file)s to
    see the source code for this PTL template.)
    </p>

    <p>To understand what's going on here, be sure to read the
    <code>doc/demo.txt</code> file included with Quixote.</p>

    <p>
    Here are some other features of this demo:
      <ul>
        <li><a href="simple">simple</a>:
            A Python function that generates a very simple document.
        <li><a href="error">error</a>:
            A Python function that raises an exception.
        <li><a href="12/">12/</a>:
            A Python object published through <code>_q_getname()</code>.
        <li><a href="12/factorial">12/factorial</a>:
            A method on a published Python object.
        <li><a href="widgets">widgets</a>:
            Try out the Quixote widget classes.
        <li><a href="form_demo">form demo</a>:
            A Quixote form in action.
      </ul>
    </p>
    </body>
    </html>
    """ % vars()
