36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
|
# -*- coding: utf-8; -*-
|
||
|
"""
|
||
|
Rattail Tempmon Demo web app
|
||
|
"""
|
||
|
|
||
|
from __future__ import unicode_literals, absolute_import
|
||
|
|
||
|
from tailbone import app
|
||
|
|
||
|
|
||
|
def main(global_config, **settings):
|
||
|
"""
|
||
|
This function returns a Pyramid WSGI application.
|
||
|
"""
|
||
|
# set some defaults for PostgreSQL
|
||
|
app.provide_postgresql_settings(settings)
|
||
|
|
||
|
# prefer Rattail Tempmon Demo templates over Tailbone; use 'better' theme
|
||
|
settings.setdefault('mako.directories', ['rattail_tempmon_demo.web:templates',
|
||
|
'tailbone:templates/themes/better',
|
||
|
'tailbone:templates',])
|
||
|
|
||
|
# make config objects
|
||
|
rattail_config = app.make_rattail_config(settings)
|
||
|
pyramid_config = app.make_pyramid_config(settings)
|
||
|
|
||
|
# bring in the rest of Rattail Tempmon Demo
|
||
|
pyramid_config.include('rattail_tempmon_demo.web.static')
|
||
|
pyramid_config.include('rattail_tempmon_demo.web.subscribers')
|
||
|
pyramid_config.include('rattail_tempmon_demo.web.views')
|
||
|
|
||
|
# configure PostgreSQL some more
|
||
|
app.configure_postgresql(pyramid_config)
|
||
|
|
||
|
return pyramid_config.make_wsgi_app()
|