summaryrefslogtreecommitdiff
path: root/docs/quick_tutorial/package/tutorial
diff options
context:
space:
mode:
authorChristoph Zwerschke <cito@online.de>2016-04-19 20:07:12 +0200
committerChristoph Zwerschke <cito@online.de>2016-04-19 20:07:12 +0200
commit3629c49e46207ff5162a82883c14937e6ef4c186 (patch)
tree1306181202cb8313f16080789f5b9ab1eeb61d53 /docs/quick_tutorial/package/tutorial
parent804ba0b2f434781e77d2b5191f1cd76a490f6610 (diff)
parent6c16fb020027fac47e4d2e335cd9e264dba8aa3b (diff)
downloadpyramid-3629c49e46207ff5162a82883c14937e6ef4c186.tar.gz
pyramid-3629c49e46207ff5162a82883c14937e6ef4c186.tar.bz2
pyramid-3629c49e46207ff5162a82883c14937e6ef4c186.zip
Merge remote-tracking branch 'refs/remotes/Pylons/master'
Diffstat (limited to 'docs/quick_tutorial/package/tutorial')
-rw-r--r--docs/quick_tutorial/package/tutorial/__init__.py1
-rw-r--r--docs/quick_tutorial/package/tutorial/app.py17
2 files changed, 18 insertions, 0 deletions
diff --git a/docs/quick_tutorial/package/tutorial/__init__.py b/docs/quick_tutorial/package/tutorial/__init__.py
new file mode 100644
index 000000000..d310fdde9
--- /dev/null
+++ b/docs/quick_tutorial/package/tutorial/__init__.py
@@ -0,0 +1 @@
+# package \ No newline at end of file
diff --git a/docs/quick_tutorial/package/tutorial/app.py b/docs/quick_tutorial/package/tutorial/app.py
new file mode 100644
index 000000000..210075023
--- /dev/null
+++ b/docs/quick_tutorial/package/tutorial/app.py
@@ -0,0 +1,17 @@
+from wsgiref.simple_server import make_server
+from pyramid.config import Configurator
+from pyramid.response import Response
+
+
+def hello_world(request):
+ print ('Incoming request')
+ return Response('<body><h1>Hello World!</h1></body>')
+
+
+if __name__ == '__main__':
+ config = Configurator()
+ config.add_route('hello', '/')
+ config.add_view(hello_world, route_name='hello')
+ app = config.make_wsgi_app()
+ server = make_server('0.0.0.0', 6543, app)
+ server.serve_forever() \ No newline at end of file