durusmail: quixote-users: Quixote send a simple response string
Quixote send a simple response string
2007-02-19
2007-02-19
2007-02-20
Quixote send a simple response string
Mike Orr
2007-02-20
On 2/18/07, Ernesto Adorio  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 
reply