Re: Quixote send a simple response string

"Mike Orr" <[email protected]> Tue, 20 Feb 2007 11:29:44 -0800
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
On 2/18/07, Ernesto Adorio <[email protected]> wrote:
>  I have a simple question: What is the Quixote
>    equivalent of the following ASP script
>    <%
>    response.write(time)
>    %>
>
>    I tried
>    def testajax [plain](self):
>       print "debugging:returning time value"
>       return "%s" % time.time()
>
>    with "testajax" in my _q_exports list. The function
>    testajax is called as gleaned from the error log,
>    but all I get is  a Page not found
>    error in my test browser.

Did you add it to ._q_exports ?  That's usually what "page not found" means.

You should also set the correct MIME type if not returning HTML:

quixote.get_response().set_content_type("text/plain", "iso-8895-1")

-- 
Mike Orr <[email protected]>