<s> """<STR_LIT>""" <EOL> from __future__ import unicode_literals <EOL> import logging <EOL> from pyramid . tweens import EXCVIEW <EOL> from pyramid . settings import asbool <EOL> import zope . sqlalchemy <EOL> from h import assets <EOL> from h import db <EOL> from h . config import configure <EOL> log = logging . getLogger ( __name__ ) <EOL> def configure_jinja2_assets ( config ) : <EOL> assets_env = assets . Environment ( '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> jinja2_env = config . get_jinja2_environment ( ) <EOL> jinja2_env . globals [ '<STR_LIT>' ] = assets_env . urls <EOL> def in_debug_mode ( request ) : <EOL> return asbool ( request . registry . settings . get ( '<STR_LIT>' ) ) <EOL> def tm_activate_hook ( request ) : <EOL> if request . path . startswith ( ( '<STR_LIT>' , '<STR_LIT>' ) ) : <EOL> return False <EOL> return True <EOL> def create_app ( global_config , ** settings ) : <EOL> """<STR_LIT>""" <EOL> config = configure ( settings = settings ) <EOL> config . include ( __name__ ) <EOL> return config . make_wsgi_app ( ) <EOL> def includeme ( config ) : <EOL> config . set_root_factory ( '<STR_LIT>' ) <EOL> config . add_subscriber ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> config . add_subscriber ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> config . add_subscriber ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) <EOL> config . add_tween ( '<STR_LIT>' , under = EXCVIEW ) <EOL> config . add_tween ( '<STR_LIT>' ) <EOL> config . add_tween ( '<STR_LIT>' ) <EOL> config . add_tween ( '<STR_LIT>' ) <EOL> config . add_renderer ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> config . add_request_method ( in_debug_mode , '<STR_LIT>' , reify = True ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . add_jinja2_extension ( '<STR_LIT>' ) <EOL> config . add_jinja2_extension ( '<STR_LIT>' ) <EOL> config . action ( None , configure_jinja2_assets , args = ( config , ) ) <EOL> config . add_settings ( { <EOL> "<STR_LIT>" : <NUM_LIT:3> , <EOL> "<STR_LIT>" : tm_activate_hook , <EOL> "<STR_LIT>" : False , <EOL> } ) <EOL> config . include ( '<STR_LIT>' ) <EOL> zope . sqlalchemy . register ( db . Session ) <EOL> config . add_settings ( { <EOL> "<STR_LIT>" : { <EOL> "<STR_LIT>" : [ "<STR_LIT>" , "<STR_LIT>" ] , <EOL> "<STR_LIT>" : [ config . registry . settings . get ( "<STR_LIT>" ) ] , <EOL> "<STR_LIT>" : [ "<STR_LIT>" ] , <EOL> "<STR_LIT>" : [ "<STR_LIT>" , "<STR_LIT>" ] , <EOL> } , <EOL> } ) <EOL> config . include ( '<STR_LIT>' , route_prefix = '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' , route_prefix = '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) <EOL> config . include ( '<STR_LIT>' ) </s>
