diff options
author | luxagraf <sng@luxagraf.net> | 2017-12-20 10:13:33 -0800 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2017-12-20 10:13:33 -0800 |
commit | 46673fb999a2e3520f505ea41e1bde1065bba542 (patch) | |
tree | fc79baf271b485131db0dc100b1d83d01d77fac9 /app/links | |
parent | cc1c0205daf9f3e7003f70044d3fbaeda6e0cd53 (diff) |
added tag list to top of links page
Diffstat (limited to 'app/links')
-rw-r--r-- | app/links/views.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/links/views.py b/app/links/views.py index b00d32c..2c74509 100644 --- a/app/links/views.py +++ b/app/links/views.py @@ -8,6 +8,11 @@ class LinkListView(PaginatedListView): model = Link template_name = 'archives/links.html' + def get_context_data(self, **kwargs): + # Call the base implementation first to get a context + context = super(LinkListView, self).get_context_data(**kwargs) + context['tags'] = Link.tags.all() + return context class LinkTagListView(PaginatedListView): model = Link @@ -20,6 +25,7 @@ class LinkTagListView(PaginatedListView): # Call the base implementation first to get a context context = super(LinkTagListView, self).get_context_data(**kwargs) context['tag'] = Tag.objects.get(slug__exact=self.kwargs['slug']) + context['tags'] = Link.tags.all() return context class LinkDetailView(DetailView): |