Skip to content

Commit 5c2b264

Browse files
author
jnm
committed
Use staticfiles contrib app to support "advanced use case," e.g. S3
https://docs.djangoproject.com/en/dev/ref/templates/builtins/#static
1 parent 3e595b7 commit 5c2b264

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

leaflet/templates/leaflet/_leaflet_map.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{% load static i18n %}
1+
{% load i18n %}
2+
{% load static from staticfiles %}
23
{% if creatediv %}<div id="{{ name }}" class="leaflet-container-default"></div>{% endif %}
34
<script type="text/javascript">
45
(function () {

leaflet/templates/leaflet/admin/widget.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{% extends "leaflet/widget.html" %}
2-
{% load i18n static %}
2+
{% load i18n %}
3+
{% load static from staticfiles %}
34

45

56
{% block map_css %}

leaflet/templates/leaflet/css.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load static %}
1+
{% load static from staticfiles %}
22
<link rel="stylesheet" href="{% static "leaflet/leaflet.css" %}" />
33
<!--[if lte IE 8]>
44
<link rel="stylesheet" href="{% static "leaflet/leaflet.ie.css" %}" />

leaflet/templates/leaflet/js.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{% load i18n static %}
1+
{% load i18n %}
2+
{% load static from staticfiles %}
23
<script src="{% get_static_prefix %}leaflet/leaflet{% if DEBUG %}-src{% endif %}.js" type="text/javascript"></script>
34
{% if SRID %}
45
<script src="{% static "leaflet/proj4js.js" %}" type="text/javascript"></script>
@@ -15,4 +16,4 @@
1516
{% if with_forms %}{% include "leaflet/_leaflet_draw_i18n.js" %}{% endif %}
1617
L.Control.ResetView.TITLE = "{% trans "Reset view" %}";
1718
L.Control.ResetView.ICON = "url({% static "leaflet/images/reset-view.png" %})";
18-
</script>
19+
</script>

leaflet/templates/leaflet/widget.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{% load static leaflet_tags %}
1+
{% load leaflet_tags %}
2+
{% load static from staticfiles %}
23

34
<style type="text/css">{% block map_css %}
45
{% if map_width and map_height %}#{{ id_map }} { width: {{ map_width }}; height: {{ map_height }}; }{% endif %}

0 commit comments

Comments
 (0)