From 7ce57e85a016355a23fa67c4ab1b3f3ef28a3276 Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Sat, 20 Jan 2018 23:01:36 -0500 Subject: [PATCH] minor bug and formatting --- SmearcarDB/server.py | 1 - SmearcarDB/static/index.js | 26 +++++++++++++------------- SmearcarDB/templates/index.html | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/SmearcarDB/server.py b/SmearcarDB/server.py index 65cd0d1..cbba62e 100644 --- a/SmearcarDB/server.py +++ b/SmearcarDB/server.py @@ -12,7 +12,6 @@ app.config.update( try: with open("save.p", "rb") as f: database = pickle.load(f) - print("Loaded", database) except (FileNotFoundError) as e: database = {'languages': [], 'phonemes': [], diff --git a/SmearcarDB/static/index.js b/SmearcarDB/static/index.js index 3825160..0d06a58 100644 --- a/SmearcarDB/static/index.js +++ b/SmearcarDB/static/index.js @@ -1,5 +1,5 @@ var navSelect = "home"; -var serverURL = "http://0.0.0.0:5000"; +var serverURL = "http://localhost:5000"; var data; var navi = [ // Array containing navigation items in form [Font-Awesome class name, Display Text, Onclick function]. @@ -55,18 +55,18 @@ function updateNav(op) { function getData() { $.ajax({ - url: serverURL + '/server', - type: 'GET' - }) - .then( - function success(incoming) { - data = incoming; - }, - function error(e) { - console.log(e); - } - ); - console.log(data); + url: serverURL + '/server', + type: 'GET' + }) + .then( + function success(incoming) { + data = incoming; + console.log(data); + }, + function error(e) { + console.log(e); + } + ); } function language(language) { diff --git a/SmearcarDB/templates/index.html b/SmearcarDB/templates/index.html index 1c70623..1f98342 100644 --- a/SmearcarDB/templates/index.html +++ b/SmearcarDB/templates/index.html @@ -14,7 +14,7 @@ -
+

/smirkär/