summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Jay <software@pretaweb.com>2011-08-25 13:10:43 +1000
committerDylan Jay <software@pretaweb.com>2011-08-25 13:10:43 +1000
commita98c0169fad222654e0c2ba0573653002a21d29b (patch)
tree4144c2d26819b1883cb134b78b85f1e5772c9ca2
parentd36b566a83addddb80d221aa042b828268f185f2 (diff)
downloadpyramid-a98c0169fad222654e0c2ba0573653002a21d29b.tar.gz
pyramid-a98c0169fad222654e0c2ba0573653002a21d29b.tar.bz2
pyramid-a98c0169fad222654e0c2ba0573653002a21d29b.zip
include rather than repeat helloworld.py
-rw-r--r--docs/index.rst15
1 files changed, 1 insertions, 14 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 0acf24b5a..70cf4cabf 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -11,20 +11,7 @@ development framework. It is developed as part of the `Pylons Project
Here is one of the simplest :app:`Pyramid` applications you can make.
-.. code-block:: python
-
- from paste.httpserver import serve
- from pyramid.configuration import Configurator
-
- def hello_world(request):
- return 'Hello %(name)s!' % request.matchdict
-
- if __name__ == '__main__':
- config = Configurator()
- config.add_route('hello', '/hello/{name}')
- config.add_view(hello_world, route_name='hello')
- app = config.make_wsgi_app()
- serve(app, host='0.0.0.0')
+.. literalinclude:: narr/helloworld.py
See :ref:`firstapp_chapter` for a full explanation of how this :ref:`helloworld_imperative`
app works. Read the :ref:`narrative_documentation` to understand how :app:`Pyramid` is designed