I'm trying to learn how to set up my own Quixote applications. I've gotten the demo working, and it works just fine (using mod_python). However, when I try to set up my own (very minimal) application, using the demo as a starting point, I get redirect issues. Here's what I have in my __init__.py:

from quixote import enable_ptl
from quixote.publish import Publisher
enable_ptl()

def create_publisher():
    from quotes.index import QuotesDir
    return Publisher(QuotesDir(), display_exceptions='plain')

And in index.ptl:
from quixote.directory import Directory

class QuotesDir(Directory):
    _q_exports = [""]
    def _q_index [html] (self):
            """
            <html>
            <head>
            <title>Test Page</title>
            </head>
            <body>
            <h1>Testing</h1>
            </body>
            </html>
            """

The best clue I have is that in the Apache access log, it shows a looping redirect:

192.168.0.49 - - [29/Sep/2005:09:17:57 -0500] "GET /quotes/ HTTP/1.1" 301 74 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6"

192.168.0.49 - - [29/Sep/2005:09:17:57 -0500] "GET /quotes// HTTP/1.1" 301 75 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6"

192.168.0.49 - - [29/Sep/2005:09:17:57 -0500] "GET /quotes/// HTTP/1.1" 301 76 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6"

I'm fairly sure it has to do with the way _q_traverse() is implemented in the Directory class, but I'm having trouble figuring out what's going on - any pointers would be appreciated.

TIA,
Harper Shelby


_______________________________________________
Quixote-users mailing list
[email protected]
http://mail.mems-exchange.org/mailman/listinfo/quixote-users

Reply via email to