diff options
Diffstat (limited to 'app/jrnl/views.py')
-rw-r--r-- | app/jrnl/views.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/jrnl/views.py b/app/jrnl/views.py index 1b38de9..6b7cc8d 100644 --- a/app/jrnl/views.py +++ b/app/jrnl/views.py @@ -1,6 +1,7 @@ from django.views.generic import ListView from django.views.generic.detail import DetailView from django.views.generic.dates import DateDetailView +from django.urls import reverse from django.views.generic.dates import YearArchiveView, MonthArchiveView from django.contrib.syndication.views import Feed from django.apps import apps @@ -31,6 +32,7 @@ class EntryCountryList(PaginatedListView): """ Return a list of Entries by Country in reverse chronological order """ + model = Entry def get_context_data(self, **kwargs): # Call the base implementation first to get a context @@ -102,6 +104,8 @@ class EntryDetailView(DateDetailView): model = apps.get_model(obj.model_name.app_label, obj.model_name.model) related.append(model.objects.get(slug=obj.slug, pub_date=obj.pub_date)) context['related'] = related + context['breadcrumbs'] = ("jrnl",) + context['crumb_url'] = reverse('jrnl:list') return context |