Setting "GEOFFREY_DYNMAP_URL" to none disabled the dynmap iframe
parent
e5723e260d
commit
1570264272
|
@ -272,7 +272,7 @@ class Location(models.Model):
|
|||
|
||||
base_url = getattr(settings, "GEOFFREY_DYNMAP_BASE_URL")
|
||||
world_name = getattr(settings, "GEOFFREY_DYNMAP_WORLD_NAME")
|
||||
if base_url is not None:
|
||||
if base_url:
|
||||
url = base_url + "/?worldname={}&mapname=surface&zoom=4&x={}&y=65&z={}".format(world_name, self.x_coord,
|
||||
self.z_coord)
|
||||
return url
|
||||
|
|
|
@ -24,9 +24,11 @@
|
|||
<p>Tunnel: {{ loc.tunnel.tunnel_str }}</p>
|
||||
{% endif %}
|
||||
<hr class="my-4">
|
||||
{% block info %}{% endblock %}
|
||||
<iframe src="{{ loc.dynmap_url }}" width="100%" height="500">
|
||||
Your browser does not support iframes.
|
||||
</iframe>
|
||||
{% if loc.dynmap %}
|
||||
{% block info %}{% endblock %} <iframe id="frame" style="visibility: hidden" onload="this.style.visibility = 'visible'" src="{{ loc.dynmap_url }}" width="100%" height="500">
|
||||
Your browser does not support iframes.
|
||||
</iframe>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% endblock %}
|
|
@ -90,6 +90,7 @@ class MarketList(GeoffreyModelList):
|
|||
class PointOfInterestList(GeoffreyModelList):
|
||||
model = PointOfInterest
|
||||
|
||||
|
||||
class AttractionList(GeoffreyModelList):
|
||||
model = Attraction
|
||||
|
||||
|
|
Loading…
Reference in New Issue