From 81999333d22228cb552274e470362333a0fa0b24 Mon Sep 17 00:00:00 2001 From: zalun Date: Thu, 4 Mar 2010 11:41:41 +0000 Subject: [PATCH] gallery limit removed - it will be added with paging --- flightdeck/jetpack/views.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/flightdeck/jetpack/views.py b/flightdeck/jetpack/views.py index 19b13d93..d984dffa 100644 --- a/flightdeck/jetpack/views.py +++ b/flightdeck/jetpack/views.py @@ -10,13 +10,14 @@ from base.shortcuts import get_object_or_create from jetpack.models import Jet, JetVersion, Cap, CapVersion from jetpack.default_settings import settings -def gallery(r, page=None): +def gallery(r, page=None, with_new=False): """ Display mixed list (Jetpacks with Capabilities) """ - items = list(Jet.objects.all()[0:20]) - items.extend(list(Cap.objects.all()[0:20])) - items = filter(lambda i: i.base_version, items) + items = list(Jet.objects.all()) + items.extend(list(Cap.objects.all())) + if not with_new: + items = filter(lambda i: i.base_version, items) items.sort(lambda i, j: (j.base_version.last_update - i.base_version.last_update).seconds) page = "packages"