equal
deleted
inserted
replaced
|
1 #!/usr/bin/env python |
1 """ |
2 """ |
2 Simple test server/environment for WSGI development |
3 Simple test server/environment for WSGI development |
3 """ |
4 """ |
4 |
5 |
5 import werkzeug |
6 import werkzeug |
6 |
7 |
7 from rrdweb import wsgi |
8 from rrdweb import wsgi, graph |
8 |
9 |
9 import logging |
10 import logging |
10 |
11 |
11 |
12 |
12 if __name__ == '__main__' : |
13 if __name__ == '__main__' : |
13 logging.basicConfig(format="[%(levelname)5s] %(funcName)25s : %(message)s", level=logging.DEBUG) |
14 logging.basicConfig(format="[%(levelname)5s] %(funcName)25s : %(message)s", level=logging.DEBUG) |
14 |
15 |
15 app = wsgi.WSGIApp( |
16 app = wsgi.WSGIApp( |
16 rrdpath = 'rrd/', |
17 rrdpath = 'var/rrd', |
17 tplpath = 'etc/templates', |
18 tplpath = 'etc/templates', |
18 imgpath = 'img/', |
19 imgpath = 'var/img', |
|
20 |
|
21 rrdgraph = graph.pmacct_data, |
19 ) |
22 ) |
20 |
23 |
21 # run |
24 # run |
22 werkzeug.run_simple('localhost', 8081, app, use_reloader=True, use_debugger=True, |
25 werkzeug.run_simple('localhost', 8081, app, use_reloader=True, use_debugger=True, |
23 static_files = { |
26 static_files = { |