diff options
Diffstat (limited to 'app/utils')
-rw-r--r-- | app/utils/views.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/utils/views.py b/app/utils/views.py index 152b2b7..d4c9eae 100644 --- a/app/utils/views.py +++ b/app/utils/views.py @@ -15,7 +15,8 @@ from recordings.models import Audio BREADCRUMBS = { 'SrcPost':'SRC', 'Book':'Book Notes', - 'Entry':'Jrnl' + 'Entry':'Jrnl', + 'NewsletterMailing':'lttr' } class PaginatedListView(ListView): @@ -31,7 +32,6 @@ class PaginatedListView(ListView): request.page_url = "/" + path + '/%d/' else: request.page_url = request.path + '%d/' - print(request.page_url) request.page = int(self.kwargs['page']) request.base_path = path return super(PaginatedListView, self).dispatch(request, *args, **kwargs) @@ -42,6 +42,7 @@ class PaginatedListView(ListView): ''' # Call the base implementation first to get a context context = super(PaginatedListView, self).get_context_data(**kwargs) + print('model=', self.model) try: context['breadcrumbs'] = (BREADCRUMBS[self.model.__name__],) except KeyError: @@ -72,7 +73,7 @@ class LuxDetailView(DetailView): context['crumb_url'] except KeyError: try: - context['crumb_url'] = reverse('%s:list' % self.object._meta.verbose_name_plural) + context['crumb_url'] = reverse('%s:list' % self.object._meta.verbose_name_plural.slugify()) except: # special case for pages: context['breadcrumbs'] = (self.object.title,) |