summaryrefslogtreecommitdiff
path: root/app/locations/views.py
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2022-01-01 14:15:09 -0500
committerlxf <sng@luxagraf.net>2022-01-01 14:15:09 -0500
commit00e4023b3db50534296b0f3c808ddd22f01ef484 (patch)
tree6f72bfd7baf4284c19df483193726fb92eb1963d /app/locations/views.py
parent3fca752fb0613b8c2af2d94b9dca78fdee7a9d46 (diff)
loc: fixed walk/track changes and updated templates
Diffstat (limited to 'app/locations/views.py')
-rw-r--r--app/locations/views.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/app/locations/views.py b/app/locations/views.py
index 7487a17..666e9a3 100644
--- a/app/locations/views.py
+++ b/app/locations/views.py
@@ -100,11 +100,11 @@ class LocationDetail(DetailView):
return context
-class TrackDetail(DetailView):
+class TrackDetailView(DetailView):
model = Track
def get_context_data(self, **kwargs):
- context = super(WalkDetail, self).get_context_data(**kwargs)
+ context = super(TrackDetailView, self).get_context_data(**kwargs)
context['entry_list'] = Post.objects.filter(
Q(location=self.get_object().location) |
Q(location__in=Location.objects.filter(parent=self.get_object().location))
@@ -113,12 +113,20 @@ class TrackDetail(DetailView):
Q(location=self.get_object().location) |
Q(location__in=Location.objects.filter(parent=self.get_object().location))
).order_by('ap_id', 'ap__apclass__kind').distinct("ap")
+ context['breadcrumbs'] = ("walks",self.object.date_walked.year,self.object.title)
return context
-class TrackList(PaginatedListView):
+class TrackListView(PaginatedListView):
"""
Return list of Walks
"""
model = Track
- template_name = 'locations/walk_list.html'
+
+ def get_context_data(self, **kwargs):
+ '''
+ Add breadcrumb path
+ '''
+ context = super(TrackListView, self).get_context_data(**kwargs)
+ context['breadcrumbs'] = ("walks",)
+ return context