forked from rc/aircox
ProgramPageListView + article list view
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
|
||||
from django.core.exceptions import FieldDoesNotExist
|
||||
from django.http import Http404
|
||||
from django.views.generic import DetailView, ListView
|
||||
|
||||
@ -45,10 +46,11 @@ class PageDetailView(BaseView, DetailView):
|
||||
return super().get_context_data(**kwargs)
|
||||
|
||||
|
||||
# TODO: pagination: in template, only a limited number of pages displayed
|
||||
class PageListView(BaseView, ListView):
|
||||
template_name = 'aircox/page_list.html'
|
||||
item_template_name = 'aircox/page_item.html'
|
||||
paginate_by = 10
|
||||
paginate_by = 20
|
||||
show_headline = True
|
||||
show_side_nav = True
|
||||
categories = None
|
||||
@ -82,3 +84,4 @@ class PageListView(BaseView, ListView):
|
||||
return super().get_context_data(**kwargs)
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user