Aaron

Merge branch 'update_4' into 'master'

Added config option for libraries location;



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