Aaron

Merge branch 'update_4' into 'master'

Added config option for libraries location;



See merge request !9
... ... @@ -12,8 +12,6 @@ if __name__ == '__main__':
base_path = os.path.join(html_path, '..')
conf_path = os.path.join(html_path, 'site.config' )
sys.path.append(base_path)
# Import web framework modules
from src.plugins import SQLAlchemyPlugin
from src.tools import Jinja2Tool, SQLAlchemyTool, DebugTool
... ... @@ -26,6 +24,11 @@ if __name__ == '__main__':
cherrypy.log('Failed loading config file: %s', e)
sys.exit(1)
# Register location of application and libraries (git submodules)
libs_path = conf['path']['libraries']
sys.path.append(libs_path)
sys.path.append(base_path)
#if conf['global']['server.wsgi'] is False:
# from cherrypy._cpnative_server import CPHTTPServer
# cherrypy.server.httpserver = CPHTTPServer(cherrypy.server)
... ...
[global]
server.socket_host: '127.0.0.6'
server.socket_port: 9009
server.wsgi: False
log.screen: False
[/]
tools.trailing_slash.on: False
tools.render.on: False
tools.db.on: True
tools.debug.on: False
tools.sessions.on: True
tools.sessions.storage_class: cherrypy.lib.sessions.FileSession
tools.sessions.storage_path: '/var/www/prioritize.onnix.io/html/sessions'
tools.sessions.timeout = 60
tools.sessions.name = 'prioritize_sid'
[logs]
access: '/var/www/prioritize.onnix.io/html/logs/access.log'
error: '/var/www/prioritize.onnix.io/html/logs/error.log'
level: 'DEBUG'
[apps]
Root: ('app', '')
List: ('app', '/list')
Item: ('app', '/item')
[path]
templates: '/var/www/prioritize.onnix.io/public/templates'
libraries: '/var/www/prioritize.onnix.io/lib'
[db]
host: 'DB_HOST'
port: 1234
name: 'DB_NAME'
user: 'DB_USER'
pass: 'DB_PORT'
... ...