python directory renamed to former perl directory
comment on RFC
This commit is contained in:
parent
e80b8874ff
commit
f99e155b8c
16 changed files with 1 additions and 1 deletions
|
@ -1,37 +0,0 @@
|
|||
#!/usr/bin/env python2.4
|
||||
import os
|
||||
import WebInterfaceSites
|
||||
|
||||
try:
|
||||
import cherrypy
|
||||
except:
|
||||
print "Could not import the cherrypy module! Try 'apt-get install python-cherrypy'."
|
||||
sys.exit(1)
|
||||
|
||||
class CryptoBoxWebserver:
|
||||
'''this class starts the cherryp webserver and serves the single sites'''
|
||||
|
||||
def __init__(self):
|
||||
cherrypy.root = WebInterfaceSites.WebInterfaceSites()
|
||||
#expose static content:
|
||||
#I currently have no idea how to cleanly extract the stylesheet path from
|
||||
#the config object without an extra CryptoBox.CryptoBoxProps instance.
|
||||
#perhaps put config handling into a seperate class in CryptoBox.py?
|
||||
#
|
||||
# the following manual mapping is necessary, as we may not use relative
|
||||
# paths in the config file
|
||||
cherrypy.config.configMap.update({
|
||||
"/cryptobox-misc": {
|
||||
"staticFilter.on" : True,
|
||||
"staticFilter.dir": os.path.abspath("../www-data" )}
|
||||
})
|
||||
|
||||
def start(self):
|
||||
# just use this config, when we're startet directly
|
||||
cherrypy.config.update(file = "cryptoboxwebserver.conf")
|
||||
cherrypy.server.start()
|
||||
|
||||
if __name__ == "__main__":
|
||||
cbw = CryptoBoxWebserver()
|
||||
cbw.start()
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue