From b8dfef691e1582c370006d8789e04aa53462f5ef Mon Sep 17 00:00:00 2001 From: reverend Date: Sat, 12 Sep 2020 11:58:45 +0200 Subject: [PATCH] Fixing bug; Place did not show up on map --- lostplaces/lostplaces_app/models.py | 1 + lostplaces/lostplaces_app/templates/partials/osm_map.html | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lostplaces/lostplaces_app/models.py b/lostplaces/lostplaces_app/models.py index 0e28056..cd7ddca 100644 --- a/lostplaces/lostplaces_app/models.py +++ b/lostplaces/lostplaces_app/models.py @@ -9,6 +9,7 @@ database. import os import uuid +from django.urls import reverse from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save diff --git a/lostplaces/lostplaces_app/templates/partials/osm_map.html b/lostplaces/lostplaces_app/templates/partials/osm_map.html index 2433263..ad71e22 100644 --- a/lostplaces/lostplaces_app/templates/partials/osm_map.html +++ b/lostplaces/lostplaces_app/templates/partials/osm_map.html @@ -18,13 +18,13 @@ var vectorSource = new ol.source.Vector({ features: [ - {% for config.point in point_list %} + {% for point in config.point_list %} new ol.Feature({ geometry: new ol.geom.Point( ol.proj.fromLonLat([{{point.longitude}},{{point.latitude}}]) ), url: '{{point.get_absolute_url}}', - name: '{{point.name}}' + name: ' {{point.name}}' }), {% endfor %} ]