diff options
| author | Chris McDonough <chrism@plope.com> | 2012-09-13 03:54:23 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-09-13 03:54:23 -0400 |
| commit | 9ff3b26dcb8ab9e846356d64a18f1ec10440e02e (patch) | |
| tree | 5c6b81b14f10b339a0d3a261f7a39e6cea9fe14f /TODO.txt | |
| parent | 8a939c76f43b58c5216eca2428adef9838c50c35 (diff) | |
| download | pyramid-9ff3b26dcb8ab9e846356d64a18f1ec10440e02e.tar.gz pyramid-9ff3b26dcb8ab9e846356d64a18f1ec10440e02e.tar.bz2 pyramid-9ff3b26dcb8ab9e846356d64a18f1ec10440e02e.zip | |
record idea from Zart about a pyramid app factory entry point for 100% declarative app
Diffstat (limited to 'TODO.txt')
| -rw-r--r-- | TODO.txt | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -95,6 +95,45 @@ Nice-to-Have - Update App engine chapter with less creaky directions. +- Idea from Zart: + + diff --git a/pyramid/paster.py b/pyramid/paster.py + index b0e4d79..b3bd82a 100644 + --- a/pyramid/paster.py + +++ b/pyramid/paster.py + @@ -8,6 +8,7 @@ from paste.deploy import ( + from pyramid.compat import configparser + from logging.config import fileConfig + from pyramid.scripting import prepare + +from pyramid.config import Configurator + + def get_app(config_uri, name=None, loadapp=loadapp): + """ Return the WSGI application named ``name`` in the PasteDeploy + @@ -111,3 +112,10 @@ def bootstrap(config_uri, request=None): + env['app'] = app + return env + + +def make_pyramid_app(global_conf, app=None, **settings): + + """Return pyramid application configured with provided settings""" + + config = Configurator(package='pyramid', settings=settings) + + if app: + + config.include(app) + + app = config.make_wsgi_app() + + return app + diff --git a/setup.py b/setup.py + index 03ebb42..91e0e21 100644 + --- a/setup.py + +++ b/setup.py + @@ -118,6 +118,8 @@ setup(name='pyramid', + [paste.server_runner] + wsgiref = pyramid.scripts.pserve:wsgiref_server_runner + cherrypy = pyramid.scripts.pserve:cherrypy_server_runner + + [paster.app_factory] + + main = pyramid.paster:make_pyramid_app + """ + ) + + Future ------ |
