|
a/Allura/allura/model/artifact.py |
|
b/Allura/allura/model/artifact.py |
|
... |
|
... |
259 |
query['pubdate']['$gte'] = since
|
259 |
query['pubdate']['$gte'] = since
|
260 |
if until is not None:
|
260 |
if until is not None:
|
261 |
query['pubdate']['$lte'] = until
|
261 |
query['pubdate']['$lte'] = until
|
262 |
cur = cls.query.find(query)
|
262 |
cur = cls.query.find(query)
|
263 |
cur = cur.sort('pubdate', pymongo.DESCENDING)
|
263 |
cur = cur.sort('pubdate', pymongo.DESCENDING)
|
|
|
264 |
if limit is None: limit = 10
|
264 |
if limit is not None: query = cur.limit(limit)
|
265 |
query = cur.limit(limit)
|
265 |
if offset is not None: query = cur.offset(limit)
|
266 |
if offset is not None: query = cur.offset(offset)
|
266 |
for r in cur:
|
267 |
for r in cur:
|
267 |
feed.add_item(title=r.title,
|
268 |
feed.add_item(title=r.title,
|
268 |
link=h.absurl(r.link.encode('utf-8')),
|
269 |
link=h.absurl(r.link.encode('utf-8')),
|
269 |
pubdate=r.pubdate,
|
270 |
pubdate=r.pubdate,
|
270 |
description=r.description,
|
271 |
description=r.description,
|