2011/6/2 Pete Emerson <[email protected]>:
> Aha, thank you, Ben! After putting in your solution and seeing it
> work, I tried to get the headers in the hello class, and it works (and
> the simple nosetest I wrote works too):
>
> class hello:
> def __init__(self):
> return web.header('Content-Type', 'text/html')
>
> def GET(self):
> return 'Hello, world!'
>
> As to whether this is the 'right' or 'best' way, I don't know. But it works.
Why not this?
class hello:
def GET(self):
web.header('Content-Type', 'text/html')
return "Hello, world!"
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.