From deb52f80ed1d47121ec3a478ab0fdb2c6f800494 Mon Sep 17 00:00:00 2001 From: Francisco Sanz Date: Thu, 26 Sep 2024 13:09:02 +0000 Subject: [PATCH] modifying media folders to store georerefenced and original photos --- frontend/static/js/main.js | 4 ++-- frontend/templates/gettask.html | 3 ++- frontend/templates/index.html | 3 ++- georeferencing/views.py | 20 ++++++++++---------- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/frontend/static/js/main.js b/frontend/static/js/main.js index 66ae36e..8dcd20e 100644 --- a/frontend/static/js/main.js +++ b/frontend/static/js/main.js @@ -135,7 +135,7 @@ $(document).ready(function () { success: function (response) { georeferencingModal.hide(); - let noCacheUrl = './georeferenced/' + image_name + geoattempt_hash + '/{z}/{x}/{y}.png' + '?nocache=' + new Date().getTime(); + let noCacheUrl = '/media/georeferenced/' + image_name + geoattempt_hash + '/{z}/{x}/{y}.png' + '?nocache=' + new Date().getTime(); if (lyr) map.removeLayer(lyr); @@ -264,7 +264,7 @@ $(document).ready(function () { } }); }); - const static_url = "/static/images/"; // Static URL + const static_url = "/media/original/"; // Static URL const imageUrl = static_url + image_name + '.JPG'; // Image URL console.log(response); const canvasWidth = $('#column-photo').width(); // Canvas width diff --git a/frontend/templates/gettask.html b/frontend/templates/gettask.html index fda777d..4bc159b 100644 --- a/frontend/templates/gettask.html +++ b/frontend/templates/gettask.html @@ -8,6 +8,7 @@ Lost At Night | Task + {% include '_google_analytics.html' %} {% bootstrap_css %} + {% include '_google_analytics.html' %} {% bootstrap_css %}