Source

nx-web / nxweb / apps / wman / __init__.py

Full commit
from pyramid.config import Configurator
from nxweb.utils.ws import WebService

def make_wsgi_app(**settings):
    """ This function returns a Pyramid WSGI application.
    """
    config = Configurator(settings=settings)
    config.include('nxweb.utils.ws')
    ws = WebService(config)

    session = ws.make_resource('session','/session')
    session.put('nxweb.apps.wman.views.session_put')

    new_task = ws.make_resource('new_task','/new_task')
    new_task.get('nxweb.apps.wman.views.new_task')

    monitor = ws.make_resource('monitor','/monitor')
    monitor.get('nxweb.apps.wman.views.get_monitor_data')


    return config.make_wsgi_app()