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