示例#1
0
def cpexception():
    cherrypy.response.status = 500
    if sys.version_info < (3,0):
        cherrypy.response.body= bytes(pages.get_template('errors/cperror.html').render(e=_cperror.format_exc()))
    else:
        cherrypy.response.body= bytes(pages.get_template('errors/cperror.html').render(e=_cperror.format_exc()),'utf8')
示例#2
0
 def wrongmethod(self,):
     cherrypy.response.status = 405
     return pages.get_template('errors/wrongmethod.html').render()
示例#3
0
 def error(self,):
     cherrypy.response.status = 500
     return pages.get_template('errors/error.html').render(info="An Error Occurred")
示例#4
0
 def loginerror(self,):
     cherrypy.response.status = 400
     return pages.get_template('errors/loginerror.html').render()
示例#5
0
 def nofoldermoveerror(self,):
     cherrypy.response.status = 400
     return pages.get_template('errors/nofoldermove.html').render()
示例#6
0
 def alreadyexists(self,):
     cherrypy.response.status = 400
     return pages.get_template('errors/alreadyexists.html').render()
示例#7
0
 def gosecure(self,):
     cherrypy.response.status = 426
     return pages.get_template('errors/gosecure.html').render()
示例#8
0
 def license(self,*path,**data):
     return pages.get_template('help/license.html').render()
示例#9
0
 def permissionerror(self,):
     cherrypy.response.status = 403
     return pages.get_template('errors/permissionerror.html').render()
示例#10
0
 def changelog(self,*path,**data):
     return pages.get_template('help/changes.html').render(myip = MyExternalIPAdress)
示例#11
0
 def helpmenu(self,*path,**data):
     return pages.get_template('help/index.html').render()
示例#12
0
 def about(self,*path,**data):
     return pages.get_template('help/about.html').render(myip = MyExternalIPAdress)
示例#13
0
 def makohelp(self,*path,**data):
     return pages.get_template('help/makoreference.html').render()
示例#14
0
 def docs(self,*path,**data):
     if path:
         return pages.get_template('help/'+path[0]+'.html').render()
     return pages.get_template('help/help.html').render()
示例#15
0
 def pagelisting(self,*path,**data):
     return pages.get_template('pagelisting.html').render_unicode(modules = modules.ActiveModules)
示例#16
0
 def index(self,*path,**data):
     pages.require("/admin/mainpage.view")
     cherrypy.response.cookie['LastSawMainPage'] = time.time()
     return pages.get_template('index.html').render()