]> git.ipfire.org Git - people/shoehn/ipfire.org.git/blobdiff - webapp/backend/planet.py
Massive web site update
[people/shoehn/ipfire.org.git] / webapp / backend / planet.py
index 9916770948ca96b965dd38141c34fbba8dd886d5..7f69b51c526396ecd00eb80781692149f0ea87e2 100644 (file)
@@ -13,6 +13,9 @@ class PlanetEntry(Object):
 
                self.data = data
 
+       def __cmp__(self, other):
+               return cmp(self.published, other.published)
+
        @property
        def id(self):
                return self.data.id
@@ -277,7 +280,7 @@ class Planet(Object):
                        SELECT *, ts_headline(markup, ranked.query, 'MinWords=100, MaxWords=110') AS markup FROM planet \
                                JOIN ranked ON planet.id = ranked.id \
                                WHERE status = %s AND published IS NOT NULL AND published <= NOW() \
-                               ORDER BY ranked DESC LIMIT 10",
+                               ORDER BY ranked DESC LIMIT 25",
                        "english", what, "english", "published")
 
                return [PlanetEntry(self.backend, e) for e in res]