diff --git a/core/views/caves.py b/core/views/caves.py index c3675a5..723df60 100644 --- a/core/views/caves.py +++ b/core/views/caves.py @@ -124,7 +124,7 @@ def getnotablecaves(): def caveindex(request): - Cave.objects.all() + #Cave.objects.all() caves1623 = list(Cave.objects.filter(area__short_name="1623")) caves1626 = list(Cave.objects.filter(area__short_name="1626")) caves1627 = list(Cave.objects.filter(area__short_name="1627")) @@ -136,6 +136,16 @@ def caveindex(request): "caveindex.html", {"caves1623": caves1623, "caves1626": caves1626, "caves1627": caves1627, "notablecaves": getnotablecaves(), "cavepage": True}, ) + +def entranceindex(request): + ents = Entrance.objects.all() + + return render( + request, + "entranceindex.html", + {"entrances": ents}, + ) + def cave3d(request, cave_id=""): diff --git a/templates/entranceindex.html b/templates/entranceindex.html new file mode 100644 index 0000000..30afdc4 --- /dev/null +++ b/templates/entranceindex.html @@ -0,0 +1,24 @@ +{% extends "cavebase.html" %} + + +{% block title %}Entrance Index{% endblock %} + +{% block content %} + +
Name | Point | Position | tr> + +
---|---|---|
{{ entrance }} | {{ entrance.best_station }} | {{ entrance.latlong }} |