/usr/lib/python3/dist-packages/pyramid_jinja2/scaffolds/jinja2_starter/+package+/__init__.py_tmpl is in python3-pyramid-jinja2 2.7+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | from pyramid.config import Configurator
from {{package}}.resources import get_root
def main(global_config, **settings):
""" This function returns a WSGI application.
It is usually called by the PasteDeploy framework during
``paster serve``.
"""
settings = dict(settings)
settings.setdefault('jinja2.i18n.domain', '{{project}}')
config = Configurator(root_factory=get_root, settings=settings)
config.add_translation_dirs('locale/')
config.include('pyramid_jinja2')
config.add_static_view('static', 'static')
config.add_view('{{package}}.views.my_view',
context='{{package}}.resources.MyResource',
renderer="templates/mytemplate.jinja2")
return config.make_wsgi_app()
|