Commits

Guilherme Gondim committed cb4fc08

rename DIARIO_NUM_LATEST to DIARIO_PAGINATE_BY

Comments (0)

Files changed (3)

diario/settings.py

 If you do not configure the settings below in your own project settings.py,
 they will assume default values::
 
-    DIARIO_NUM_LATEST
-        Number of latest itens on object_list view. Default: 10.
+    DIARIO_PAGINATE_BY
+        Number of entries to paginate. Default: 10.
 
 """
 
 from django.conf import settings
 
 
-NUM_LATEST = getattr(settings, 'DIARIO_NUM_LATEST', 10)
+PAGINATE_BY = getattr(settings, 'DIARIO_PAGINATE_BY', 10)

diario/views/entries.py

 from django.views.generic import dates
 from django.views.generic.list import ListView
 
-from diario.settings import NUM_LATEST
+from diario.settings import PAGINATE_BY
 from diario.views.mixins.base import BasicEntryMixin
 
 
 
 
 class EntryListView(BasicEntryMixin, ListView):
-    paginate_by = NUM_LATEST
+    paginate_by = PAGINATE_BY

diario/views/entries_by_author.py

 from django.shortcuts import get_object_or_404
 from django.views.generic.list import ListView
 
-from diario.settings import NUM_LATEST
+from diario.settings import PAGINATE_BY
 from diario.views.mixins import BasicEntryMixin
 
 
 class EntryListByAuthorView(BasicEntryMixin, ListView):
-    paginate_by = NUM_LATEST
+    paginate_by = PAGINATE_BY
     template_name = 'diario/entry_list_by_author.html'
     
     def get_queryset(self):