cahnge urls
This commit is contained in:
+3
-3
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user