- ### patch : return the latest one..
- if work_offline:
- # if that won't work then we'll try to update anyways
- try:
- with (file(offline_filename,"r")) as f:
- json_answer=f.read()
- print "By-passing : using contents from %s"%offline_filename
- return HttpResponse (json_answer, mimetype="application/json")
- except:
- import traceback
- traceback.print_exc()
- print "Could not run in offline mode, PROCEEDING"
- pass