--- /dev/null
+{% load l10n %}
+
+<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
+ integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
+ crossorigin=""/>
+ <script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
+ integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
+ crossorigin=""></script>
+
+<div id="map" style="height: 100%"></div>
+<script>
+ var map = L.map('map').setView([51.505, -0.09], 8);
+ L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
+ attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
+ }).addTo(map);
+
+ {% localize off %}
+ {% for e in entities %}
+ L.marker(
+ [{{ e.lat }}, {{ e.lon }}],
+ {
+ title: "{{ e.label }}",
+ alt: "{{ e.label }}",
+ }
+ ).bindPopup("\
+<h1>{{ e.label }}</h1>\
+{% for ref in e.reference_set.all %}\
+<a href='/katalog/lektura/{{ ref.book.slug }}.html#{{ ref.first_section }}'>\
+ {{ ref.book.title }}\
+</a>\
+{% endfor %}\
+ ").addTo(map);
+ {% endfor %}
+ {% endlocalize %}
+</script>
--- /dev/null
+from django.urls import path
+from . import views
+
+
+urlpatterns = [
+ path('mapa/', views.map),
+]
from django.shortcuts import render
+from . import models
-# Create your views here.
+
+def map(request):
+ return render(request, 'references/map.html', {
+ 'entities': models.Entity.objects.exclude(lat=None).exclude(lon=None),
+ })
+
path('wesprzyj/', include('funding.urls')),
path('ankieta/', include('polls.urls')),
path('biblioteki/', include('libraries.urls')),
+ path('pinezki/', include('references.urls')),
path('newsletter/', include('newsletter.urls')),
path('formularz/', include('forms_builder.forms.urls')),
path('isbn/', include('isbn.urls')),