import logging
log = logging.getLogger(__name__)

from pyramid.config import Configurator
from sqlalchemy import engine_from_config



def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    engine = engine_from_config(settings, 'sqlalchemy.')
    DBSession.configure(bind=engine)
    config = Configurator(settings=settings)



        exit(-1)


    config.add_static_view('static', 'static', cache_max_age=3600)





@@ -126,16 +126,113 @@
 config%0A%0A
+%0Arequired_settings = %5B%0A        'pyramid.secret.session',%0A        'pyramid.secret.auth',%0A        %5D
 %0A%0Adef ma
@@ -468,17 +468,301 @@
 tings)%0A%0A
-%0A
+    do_start = True%0A%0A    for _req in required_settings:%0A        if _req not in settings:%0A            log.error('%7B%7D is not set in configuration file.'.format(_req))%0A            do_start = False%0A%0A    if do_start is False:%0A        log.error('Unable to start due to missing configuration')
 %0A       

Check for some required settings