1 from django.http import Http404
2 from django.shortcuts import render, get_object_or_404
3 from django.views.decorators.cache import never_cache
4 from catalogue.models import Book
5 from catalogue.views import analyse_tags
10 return render(request, 'references/map.html', {
12 'entities': models.Entity.objects.exclude(lat=None).exclude(lon=None),
13 'funding_no_show_current': True,
16 def pin_map_tagged(request, tags):
18 tags = analyse_tags(request, tags)
22 books = Book.tagged.with_all(tags)
24 return render(request, 'references/map.html', {
25 'entities': models.Entity.objects.exclude(lat=None).exclude(lon=None).filter(reference__book__in=books).distinct(),
26 'funding_no_show_current': True,
30 def popup(request, pk):
31 e = get_object_or_404(models.Entity, pk=pk)
32 return render(request, 'references/popup.html', {