summaryrefslogtreecommitdiff
path: root/app/utils
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2020-08-03 18:39:37 -0400
committerluxagraf <sng@luxagraf.net>2020-08-03 18:39:37 -0400
commit55409474092d594f3c483e0869b71f962c706322 (patch)
tree191608fdcf157e1be1477f4a6ad95e4af78c4f77 /app/utils
parenteea8117ac3b58d8ac9eb1c9f94d27ac28fc67008 (diff)
added the rest of my recent work
Diffstat (limited to 'app/utils')
-rw-r--r--app/utils/views.py7
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,)