| 1 |
__id__ = '$Id$'
|
| 2 |
__version__ = '$Revision: $'
|
| 3 |
__modulename__ = 'Responder501'
|
| 4 |
|
| 5 |
import os
|
| 6 |
|
| 7 |
from harmonious import harm
|
| 8 |
from harmonious.lib.template import Template
|
| 9 |
from harmonious._baseresponder import BaseResponder
|
| 10 |
|
| 11 |
class Responder501(BaseResponder):
|
| 12 |
|
| 13 |
def _construct(self):
|
| 14 |
|
| 15 |
self.add_header('Content-Type', 'text/html')
|
| 16 |
self.add_header('Status', '501')
|
| 17 |
|
| 18 |
template = Template()
|
| 19 |
template.param('501_MSG', self.get_body())
|
| 20 |
template.compile(os.path.join(harm.config.server['TemplatePath'], '501.tpl'))
|
| 21 |
self.set_body(template.output())
|
| 22 |
|