source: rattail/rattail/data/project/+package+/web/app.py_tmpl @ 572b04c

Last change on this file since 572b04c was 572b04c, checked in by Lance Edgar <lance@…>, 3 years ago

Update project template to stop referencing 'better' tailbone theme

  • Property mode set to 100644
File size: 1022 bytes
Line 
1# -*- coding: utf-8; mode: python; -*-
2"""
3{{project_title}} web app
4"""
5
6from __future__ import unicode_literals, absolute_import
7
8from tailbone import app
9
10
11def main(global_config, **settings):
12    """
13    This function returns a Pyramid WSGI application.
14    """
15    # set some defaults for PostgreSQL
16    app.provide_postgresql_settings(settings)
17
18    # prefer {{project_title}} templates over Tailbone
19    settings.setdefault('mako.directories', ['{{package}}.web:templates',
20                                             'tailbone:templates',])
21
22    # make config objects
23    rattail_config = app.make_rattail_config(settings)
24    pyramid_config = app.make_pyramid_config(settings)
25
26    # bring in the rest of {{project_title}}
27    pyramid_config.include('{{package}}.web.static')
28    pyramid_config.include('{{package}}.web.subscribers')
29    pyramid_config.include('{{package}}.web.views')
30
31    # configure PostgreSQL some more
32    app.configure_postgresql(pyramid_config)
33
34    return pyramid_config.make_wsgi_app()
Note: See TracBrowser for help on using the repository browser.