Commit e922d3bf5acdc767fa17ddc2ac7302665488cae6

  • avatar
  • arvind
  • Fri Feb 08 11:39:32 IST 2013
Module logging is to be imported in a specific order, otherwise it fails loading.  +Indentation fixes.
fetch.py
(9 / 8)
  
22from flask import request
33from flask import render_template
44from flask import make_response
5import logging
56from logging import FileHandler
67import json
78import pymongo
2424 filename = request.args['json']
2525 else:
2626 filename = 'test.json'
27 filename = os.path.join('static', filename)
28 try:
29 f = open(filename, 'r')
30 except:
31 f = open('static/test.json', 'r')
32 buf = f.read()
33 f.close()
34 return render_template('editor.html', json = buf)
27 filename = os.path.join('static', filename)
28 try:
29 f = open(filename, 'r')
30 except:
31 f = open('static/test.json', 'r')
32 buf = f.read()
33 f.close()
34 return render_template('editor.html', json = buf)
3535
3636@app.route('/saveJSON', methods=['POST'])
3737def saveJSON():