Changeset 86c3621 in rattail


Ignore:
Timestamp:
03/24/19 17:19:26 (6 months ago)
Author:
Lance Edgar <ledgar@…>
Branches:
master
Children:
50768ed
Parents:
e9c2ed8
Message:

Some improvements to basic project template

Location:
rattail/data/project/+package+/web
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • rattail/data/project/+package+/web/app.py_tmpl

    re9c2ed8 r86c3621  
    1313    This function returns a Pyramid WSGI application.
    1414    """
    15     # set some defaults for PostgreSQL
    16     app.provide_postgresql_settings(settings)
    17 
    1815    # prefer {{project_title}} templates over Tailbone
    1916    settings.setdefault('mako.directories', ['{{package}}.web:templates',
    2017                                             'tailbone:templates',])
     18
     19    # for graceful handling of postgres restart
     20    settings.setdefault('retry.attempts', 2)
    2121
    2222    # make config objects
     
    2929    pyramid_config.include('{{package}}.web.views')
    3030
    31     # configure PostgreSQL some more
    32     app.configure_postgresql(pyramid_config)
     31    # for graceful handling of postgres restart
     32    pyramid_config.add_tween('tailbone.tweens.sqlerror_tween_factory',
     33                             under='pyramid_tm.tm_tween_factory')
    3334
    3435    return pyramid_config.make_wsgi_app()
  • rattail/data/project/+package+/web/menus.py_tmpl

    re9c2ed8 r86c3621  
    155155                },
    156156                {
     157                    'title': "Tables",
     158                    'url': url('tables'),
     159                    'perm': 'tables.list',
     160                },
     161                {
    157162                    'title': "{{project_title}} Upgrades",
    158163                    'url': url('upgrades'),
  • rattail/data/project/+package+/web/views/__init__.py_tmpl

    re9c2ed8 r86c3621  
    1212    config.include('{{package}}.web.views.common')
    1313    config.include('tailbone.views.auth')
     14    config.include('tailbone.views.tables')
    1415    config.include('tailbone.views.upgrades')
     16    config.include('tailbone.views.progress')
    1517
    1618    # main table views
Note: See TracChangeset for help on using the changeset viewer.