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', {
11 'entities': models.Entity.objects.exclude(lat=None).exclude(lon=None),
12 'funding_no_show_current': True,
15 def pin_map_tagged(request, tags):
17 tags = analyse_tags(request, tags)
21 books = Book.tagged.with_all(tags)
23 return render(request, 'references/map.html', {
24 'entities': models.Entity.objects.exclude(lat=None).exclude(lon=None).filter(reference__book__in=books).distinct(),
25 'funding_no_show_current': True,
31 def popup(request, pk):
32 e = get_object_or_404(models.Entity, pk=pk)
33 return render(request, 'references/popup.html', {