From f9d0247c3b268fccfbbe24ab1cf0744095f807f9 Mon Sep 17 00:00:00 2001 From: Gitea Date: Sun, 27 Oct 2019 08:03:37 +0100 Subject: [PATCH] cahnge urls --- map/views.py | 4 ++-- mobile/views.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/map/views.py b/map/views.py index ceecead..902b1bf 100644 --- a/map/views.py +++ b/map/views.py @@ -5,10 +5,10 @@ import os def index(request): - if not os.path.isfile("/tmp/data.json"): + if not os.path.isfile("/home/areion/tmp/data.json"): data = {"trees": str({ "trees": []}) } else: - with open("/tmp/data.json", "r") as f: + with open("/home/areion/tmp/data.json", "r") as f: loaded = json.load(f) s = json.dumps(loaded); data = {"trees": s} diff --git a/mobile/views.py b/mobile/views.py index a73d97b..e0217d7 100644 --- a/mobile/views.py +++ b/mobile/views.py @@ -48,13 +48,13 @@ def addtree(request): longitude = request.POST["longitude"] latitude = request.POST["latitude"] bloom_start = datetime.now().timetuple().tm_yday - if not os.path.isfile('/tmp/data.json'): + if not os.path.isfile('/home/areion/tmp/data.json'): data = {'trees': []} else: - with open('/tmp/data.json', 'r') as f: + with open('/home/areion/tmp/data.json', 'r') as f: data = json.load(f) - with open('/tmp/data.json', 'w') as f: + with open('/home/areion/tmp/data.json', 'w+') as f: data["trees"].append( {'name': name, 'species': tree, 'longitude': longitude, 'latitude': latitude,