From: Radek Czajka Date: Sat, 10 Jun 2023 17:02:37 +0000 (+0200) Subject: experimental map X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/a94e848fd865f0a887850e4858dab64c426b10db?ds=sidebyside experimental map --- diff --git a/src/references/templates/references/map.html b/src/references/templates/references/map.html new file mode 100644 index 000000000..620483712 --- /dev/null +++ b/src/references/templates/references/map.html @@ -0,0 +1,35 @@ +{% load l10n %} + + + + +
+ diff --git a/src/references/urls.py b/src/references/urls.py new file mode 100644 index 000000000..5bd2a62cc --- /dev/null +++ b/src/references/urls.py @@ -0,0 +1,7 @@ +from django.urls import path +from . import views + + +urlpatterns = [ + path('mapa/', views.map), +] diff --git a/src/references/views.py b/src/references/views.py index 91ea44a21..b98d181f1 100644 --- a/src/references/views.py +++ b/src/references/views.py @@ -1,3 +1,9 @@ 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), + }) + diff --git a/src/wolnelektury/urls.py b/src/wolnelektury/urls.py index f34071f75..3d420cec6 100644 --- a/src/wolnelektury/urls.py +++ b/src/wolnelektury/urls.py @@ -44,6 +44,7 @@ urlpatterns += [ 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')),