Commits

Horst Gutmann committed 6ddd267

Page size used within the archive view is now configurable.

  • Participants
  • Parent commits b87bccf

Comments (0)

Files changed (2)

File cmsplugin_news/settings.py

 FEED_SIZE = get_setting('FEED_SIZE', 10)
 FEED_TITLE = get_setting('FEED_TITLE', _('News feed'))
 FEED_DESCRIPTION = get_setting('FEED_DESCRIPTION', _('A feed full of news'))
+ARCHIVE_PAGE_SIZE = get_setting('ARCHIVE_PAGE_SIZE', 15)
 

File cmsplugin_news/views.py

 from django.views.generic import ListView
 
 from . import models
+from . import settings
 
 
 class ArchiveIndexView(ListView):
     date_based.archive_index view while the latter ones are provided by
     ListView.
     """
-    paginate_by = 15
+    paginate_by = settings.ARCHIVE_PAGE_SIZE
     queryset = models.News.published.all()
     template_name = 'cmsplugin_news/news_archive.html'
     include_yearlist = True