def sysView(): OOIs.write2JSON(OOI_JSON_FILE,OWNERS_JSON_FILE) return template('tpl/sysView', asteroidDB=OOI_JSON_FILE, ownersDB=OWNERS_JSON_FILE, chunks=CHUNKS, messages=MESSAGES,message_count=2, note_count=1,notes=NOTES, task_count=4,tasks=TASKS, user=USER, pageTitle="Solar System", resources=USER.resources)
def getOOIs(): OOIs.write2JSON(OOI_JSON_FILE) # with open(OOI_JSON_FILE,'w') as f: # json.dump(OOIs.MPOs,f) # data = json.dumps(OOIs.MPOs) # if len(data) > 2: # if not empty # data = data[2:-2] # remove the weird encapsulation of the string # data = repr(data) # data = tuple(data,) # print '==datacheck1== \n',data # print 'datacheck2\n',data # data.decode("string-escape") # json=data.replace(r"\"",r") # return template('tpl/jsAsteroids',json=data) return OOI_JSON_FILE