Commit 2a9c18f85d26e577a91e284a69115fa6305c8b68
- fetch.py 10 -----+++++
- Diff rendering mode:
- inline
- side by side
fetch.py
27 | f = open(filename, 'r') | 27 | f = open(filename, 'r') |
---|---|---|---|
28 | except: | 28 | except: |
29 | f = open('static/test.json', 'r') | 29 | f = open('static/test.json', 'r') |
30 | |||
31 | |||
32 | 30 | buf = f.read() | |
31 | f.close() | ||
32 | return render_template('editor.html', json = buf) | ||
33 | 33 | ||
34 | @app.route('/saveJSON', methods=['POST']) | 34 | @app.route('/saveJSON', methods=['POST']) |
35 | def saveJSON(): | 35 | def saveJSON(): |
… | … | ||
58 | ls = glob.glob(path) | 58 | ls = glob.glob(path) |
59 | def sanitize(i): | 59 | def sanitize(i): |
60 | return i.split('/')[-1] | 60 | return i.split('/')[-1] |
61 | |||
62 | 61 | ls = map(sanitize, ls) | |
62 | return render_template('history.html', ls=ls) | ||
63 | 63 | ||
64 | 64 | ||
65 | if __name__ == "__main__": | 65 | if __name__ == "__main__": |