Commit 2a9c18f85d26e577a91e284a69115fa6305c8b68

  • avatar
  • arvind
  • Fri Feb 08 10:58:41 IST 2013
Indentation fixes.
  • 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 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)
3333
34@app.route('/saveJSON', methods=['POST'])34@app.route('/saveJSON', methods=['POST'])
35def saveJSON():35def 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 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)
6363
6464
65if __name__ == "__main__":65if __name__ == "__main__":