2 from cheetah import templates
5 from pprint import pformat
8 s_exc = cherrypy._cperror.format_exc()
9 mitsql.logging.error(s_exc)
10 return templates.common.shell(title='%s (CherryPy %s)' % (kw.get('status'), kw.get('version')),
11 content=('<p>%s</p>' + (2*'<div><pre>%s</pre></div>'))
12 % (kw.get('message'), kw.get('traceback'),
13 _phtml(dict(filter(lambda x: not x[0][:2] == '__',
14 cherrypy.request.__dict__.items())))))
19 def _404(*argv, **kw):
20 return templates.common._404()
21 def _500(*argv, **kw):
22 return _500(*argv, **kw)
26 def list(*argv, **kw):
31 'db_prefix': 'presbrey+'
33 return templates.main.db_list(**r)
37 def test(self, *argv, **kw):
38 cherrypy.response.headers['Content-type'] = 'text/plain'
39 return pformat(dict(filter(lambda x: not x[0][:2] == '__', cherrypy.request.__dict__.items())))
42 def index(self, *argv, **kw):
43 return templates.main.index()
46 def passwd(self, *argv, **kw):
47 return templates.main.passwd()