diff options
Diffstat (limited to 'docs/narr/myproject')
| -rw-r--r-- | docs/narr/myproject/myproject.ini | 3 | ||||
| -rw-r--r-- | docs/narr/myproject/myproject/configure.zcml | 4 | ||||
| -rw-r--r-- | docs/narr/myproject/myproject/run.py | 12 | ||||
| -rw-r--r-- | docs/narr/myproject/setup.py | 4 |
4 files changed, 10 insertions, 13 deletions
diff --git a/docs/narr/myproject/myproject.ini b/docs/narr/myproject/myproject.ini index 21292d14c..318c2214a 100644 --- a/docs/narr/myproject/myproject.ini +++ b/docs/narr/myproject/myproject.ini @@ -2,7 +2,8 @@ debug = true [app:main] -use = egg:myproject#make_app +use = egg:myproject#app +reload_templates = true [server:main] use = egg:PasteScript#cherrypy diff --git a/docs/narr/myproject/myproject/configure.zcml b/docs/narr/myproject/myproject/configure.zcml index 6cd692784..fdae69cb3 100644 --- a/docs/narr/myproject/myproject/configure.zcml +++ b/docs/narr/myproject/myproject/configure.zcml @@ -5,10 +5,6 @@ <!-- this directive must be included for the view declarations to work --> <include package="repoze.bfg" /> - <!-- this directive indicates that changes to templates should show up - immediately --> - <bfg:settings reload_templates="true"/> - <bfg:view for=".models.IMyModel" view=".views.my_view" diff --git a/docs/narr/myproject/myproject/run.py b/docs/narr/myproject/myproject/run.py index 9592ce441..f60a4023f 100644 --- a/docs/narr/myproject/myproject/run.py +++ b/docs/narr/myproject/myproject/run.py @@ -1,13 +1,13 @@ -def make_app(global_config, **kw): +from repoze.bfg import make_app +from repoze.bfg import get_options + +def app(global_config, **kw): # paster app config callback - from repoze.bfg import make_app from myproject.models import get_root import myproject - app = make_app(get_root, myproject) + app = make_app(get_root, myproject, options=get_options(kw)) return app if __name__ == '__main__': from paste import httpserver - app = make_app(None) - httpserver.serve(app, host='0.0.0.0', port='5432') - + httpserver.serve(app(None), host='0.0.0.0', port='6543') diff --git a/docs/narr/myproject/setup.py b/docs/narr/myproject/setup.py index 7797776c7..2d9ccda1d 100644 --- a/docs/narr/myproject/setup.py +++ b/docs/narr/myproject/setup.py @@ -35,10 +35,10 @@ setup(name='myproject', tests_require=[ 'repoze.bfg', ], - test_suite="myproject.tests", + test_suite="myproject", entry_points = """\ [paste.app_factory] - make_app = myproject.run:make_app + app = myproject.run:app """ ) |
