0
|
1 from svgsitemap import *
|
|
2 from webob import Request, Response
|
|
3
|
|
4 def example(environ, start_response):
|
|
5 link = '<a href="/%s">%s</a>'
|
|
6 body = '<br/>'.join([link % (i,i) for i in range(30)])
|
|
7 body = '<html><body>%s</body></html>' % body
|
|
8 response = Response(content_type='text/plain', body=body)
|
|
9 return response(environ, start_response)
|
|
10
|
|
11 def factory():
|
|
12 import pdb; pdb.set_trace()
|
|
13 app = MapserverMiddleware(example)
|
|
14
|
|
15 if __name__ == '__main__':
|
|
16 from wsgiref import simple_server
|
|
17 server = simple_server.make_server(host=host, port=int(54321), app=factory())
|
|
18 server.serve_forever()
|