Hello,
I've been following some posts in the mailing list about specifying a
custom content type, but I can't get this (seemingly) simple code to
work. For my purposes, I want to be able to return a FITS file - but
just to test I have the following code in my controller:
**some imports up here**
__all__ = ['ReturnSpSpecController']
class ReturnSpSpecController:
@expose()
def index(self, **kwargs):
#tg.response.set_header("content-type", "application/fits") <--
eventually what I want
tg.response.set_header("content-type", "text/html") # But I
wanted
to test this with a simple example
return "\n\nTesting, hello world."
Then in root.py I have the standard:
from spectrawebapp.controllers.returnSpSpec import
ReturnSpSpecController
[...]
class RootController(BaseController):
[...]
returnSpSpecController = ReturnSpSpecController()
[...]
However, when I try to go to http://mypage/returnSpSpec I get a 404
not found.
Is there something simple I'm doing wrong? Any help is much
appreciated, thanks!
- Adrian
--
You received this message because you are subscribed to the Google Groups
"TurboGears" 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/turbogears?hl=en.