diff options
| author | Chris McDonough <chrism@plope.com> | 2013-10-01 10:49:37 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2013-10-01 10:49:37 -0400 |
| commit | 5f3405096173450e43152c2d7172cca97512ac4e (patch) | |
| tree | 0f6b27ad2f0244d488454c572b869a3501d2acda /docs/quick_tutorial/debugtoolbar | |
| parent | d65b1597ddbdfb161a0c83c46b5ebad878571c76 (diff) | |
| parent | 1a76ed41b133ea73c7d40997c6f564fd72d7273e (diff) | |
| download | pyramid-5f3405096173450e43152c2d7172cca97512ac4e.tar.gz pyramid-5f3405096173450e43152c2d7172cca97512ac4e.tar.bz2 pyramid-5f3405096173450e43152c2d7172cca97512ac4e.zip | |
Merge branch 'master' of github.com:Pylons/pyramid
Diffstat (limited to 'docs/quick_tutorial/debugtoolbar')
| -rw-r--r-- | docs/quick_tutorial/debugtoolbar/development.ini | 40 | ||||
| -rw-r--r-- | docs/quick_tutorial/debugtoolbar/setup.py | 13 | ||||
| -rw-r--r-- | docs/quick_tutorial/debugtoolbar/tutorial/__init__.py | 13 |
3 files changed, 66 insertions, 0 deletions
diff --git a/docs/quick_tutorial/debugtoolbar/development.ini b/docs/quick_tutorial/debugtoolbar/development.ini new file mode 100644 index 000000000..470d92c57 --- /dev/null +++ b/docs/quick_tutorial/debugtoolbar/development.ini @@ -0,0 +1,40 @@ +[app:main] +use = egg:tutorial +pyramid.includes = + pyramid_debugtoolbar + +[server:main] +use = egg:pyramid#wsgiref +host = 0.0.0.0 +port = 6543 + +# Begin logging configuration + +[loggers] +keys = root, tutorial + +[logger_tutorial] +level = DEBUG +handlers = +qualname = tutorial + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = INFO +handlers = console + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s + +# End logging configuration diff --git a/docs/quick_tutorial/debugtoolbar/setup.py b/docs/quick_tutorial/debugtoolbar/setup.py new file mode 100644 index 000000000..9997984d3 --- /dev/null +++ b/docs/quick_tutorial/debugtoolbar/setup.py @@ -0,0 +1,13 @@ +from setuptools import setup + +requires = [ + 'pyramid', +] + +setup(name='tutorial', + install_requires=requires, + entry_points="""\ + [paste.app_factory] + main = tutorial:main + """, +)
\ No newline at end of file diff --git a/docs/quick_tutorial/debugtoolbar/tutorial/__init__.py b/docs/quick_tutorial/debugtoolbar/tutorial/__init__.py new file mode 100644 index 000000000..2b4e84f30 --- /dev/null +++ b/docs/quick_tutorial/debugtoolbar/tutorial/__init__.py @@ -0,0 +1,13 @@ +from pyramid.config import Configurator +from pyramid.response import Response + + +def hello_world(request): + return Response('<body><h1>Hello World!</h1></body>') + + +def main(global_config, **settings): + config = Configurator(settings=settings) + config.add_route('hello', '/') + config.add_view(hello_world, route_name='hello') + return config.make_wsgi_app()
\ No newline at end of file |
