From 8117e9b8779eeba45399162be03bc2aab7580ca7 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 8 Sep 2010 00:46:04 -0500 Subject: Paginate the news list view This view was getting huge with ~500 items on it, and most people are not really interested in seeing every single news item. Use the drop in pagination and add some controls that still allow browsing to any page of the list. Signed-off-by: Dan McGee --- news/views.py | 1 + 1 file changed, 1 insertion(+) (limited to 'news/views.py') diff --git a/news/views.py b/news/views.py index 3747211..cc16981 100644 --- a/news/views.py +++ b/news/views.py @@ -19,6 +19,7 @@ def view(request, newsid): def list(request): return list_detail.object_list(request, News.objects.all().select_related('author').defer('content'), + paginate_by=50, template_name="news/list.html", template_object_name="news") -- cgit v1.2.3-24-g4f1b