/usr/share/paster_templates/paste_deploy/+package+/sampleapp.py_tmpl is in python-pastedeploy-tpl 1.5.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | import cgi
from paste.deploy.config import CONFIG
def application(environ, start_response):
# Note that usually you wouldn't be writing a pure WSGI
# application, you might be using some framework or
# environment. But as an example...
start_response('200 OK', [('Content-type', 'text/html')])
greeting = CONFIG['greeting']
content = [
'<html><head><title>%s</title></head>\n' % greeting,
'<body><h1>%s!</h1>\n' % greeting,
'<table border=1>\n',
]
items = environ.items()
items.sort()
for key, value in items:
content.append('<tr><td>%s</td><td>%s</td></tr>\n'
% (key, cgi.escape(repr(value))))
content.append('</table></body></html>')
return content
|