Only include supported versions on the frontpage
authorMagnus Hagander <magnus@hagander.net>
Tue, 12 Jul 2011 13:50:23 +0000 (14:50 +0100)
committerMagnus Hagander <magnus@hagander.net>
Tue, 12 Jul 2011 13:50:23 +0000 (14:50 +0100)
pgweb/core/views.py

index 78746e6685bb1d96d46f79f0bd40997570bdf4a8..1a8bbc58d1f16d5702737afe29a4da26d545e0bd 100644 (file)
@@ -38,7 +38,7 @@ def home(request):
                quote = Quote.objects.filter(approved=True).order_by('?')[0]
        except:
                pass # if there is no quote available, just ignore error
-       versions = Version.objects.all()
+       versions = Version.objects.filter(supported=True)
        planet = ImportedRSSItem.objects.filter(feed__internalname="planet").order_by("-posttime")[:5]
 
        traininginfo = Event.objects.filter(approved=True, training=True).extra(where=("startdate <= (CURRENT_DATE + '6 Months'::interval) AND enddate >= CURRENT_DATE",)).aggregate(Count('id'), Count('country', distinct=True))