From 954246db0ca598f1eda7697b7354c1a0354e3123 Mon Sep 17 00:00:00 2001 From: zakhy <=> Date: Tue, 8 Apr 2025 13:43:22 +0700 Subject: [PATCH] FIx --- positioning/apps/main/templates/main/index.html | 4 ++-- positioning/project/settings/base.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/positioning/apps/main/templates/main/index.html b/positioning/apps/main/templates/main/index.html index b801892..8f0de0b 100644 --- a/positioning/apps/main/templates/main/index.html +++ b/positioning/apps/main/templates/main/index.html @@ -160,7 +160,7 @@ function VlocationStyleFunction(feature, resolution) { return new ol.style.Style({ image: new ol.style.Icon({ - src: '/static/img/worker.png', + src: '{% static 'img/worker.png' %}', width: 25, height: 30 }) @@ -170,7 +170,7 @@ function BaseStationStyleFunction(feature, resolution) { return new ol.style.Style({ image: new ol.style.Icon({ - src: '/static/img/base-station.png', + src: '{% static 'img/base-station.png' %}', width: 50, height: 40 }) diff --git a/positioning/project/settings/base.py b/positioning/project/settings/base.py index c08a319..0dff946 100644 --- a/positioning/project/settings/base.py +++ b/positioning/project/settings/base.py @@ -2,6 +2,8 @@ import os import zoneinfo from pathlib import Path +from django.conf import settings + BASE_DIR = Path(__file__).resolve().parent.parent.parent ALLOWED_HOSTS = ["*"] @@ -84,4 +86,4 @@ SESSION_COOKIE_NAME = "mfss_pos_session" CSRF_TRUSTED_ORIGINS = ["http://192.168.10.3:8095", "http://0.0.0.0:8000"] -FORCE_SCRIPT_NAME = "/mfss-positioning" +FORCE_SCRIPT_NAME = "/mfss-positioning" if settings.DEBUG else None