Beispiel #1
0
 def get_objects_for_rdf(self, attr=None, reversed=False):
     #return the objects to be syndicated
     #sorted by the attribute attr
     objects = self._exec({'context': self, 'container': self}, {}, {})
     if attr is not None:
         return utils.utSortObjsListByAttr(self, objects, attr, reversed)
     return objects
Beispiel #2
0
 def get_objects_for_rdf(self, attr=None, reversed=False):
     # return the objects to be syndicated
     # sorted by the attribute attr
     objects = self._exec({"context": self, "container": self}, {}, {})
     if attr is not None:
         return utils.utSortObjsListByAttr(self, objects, attr, reversed)
     return objects
Beispiel #3
0
 def get_objects_for_rdf(self, attr=None, reversed=False):
     # return the objects to be syndicated
     # sorted by the attribute attr
     objects = self._exec({'context': self, 'container': self}, {}, {})
     if not objects:
         objects = []
     now = DateTime()
     objects = [ob for ob in objects if
                getattr(ob, 'topitem', None) or
                getattr(ob, 'expirationdate', now) is None or
                getattr(ob, 'expirationdate', now) + 1 > now
                ]
     if attr is not None:
         return utils.utSortObjsListByAttr(self, objects, attr, reversed)
     return objects