22
22
from loggerhead import util
23
from loggerhead.templatefunctions import templatefunctions
26
25
class AtomUI (object):
28
def __init__(self, branch):
33
@turbogears.expose(template='zpt:loggerhead.templates.atom',
34
format="xml", content_type="application/atom+xml")
35
def default(self, *args, **kwargs):
36
h = self._branch.get_history()
40
pagesize = int(self._branch.config.get('pagesize', '20'))
42
revid_list = h.get_file_view(h.last_revid, None)
43
entries = list(h.get_changes(list(revid_list)[:pagesize]))
46
'branch': self._branch,
50
'updated': entries[0].date.isoformat() + 'Z',
52
vals.update(templatefunctions)
27
@turbogears.expose(template='loggerhead.templates.atom', format="xml", content_type="application/atom+xml")
28
def default(self, *args):
29
h = util.get_history()
31
# really, there is no point giving a revid here...
36
revlist = h.get_short_revision_history_from(revid)
37
entries = list(h.get_changelist(list(revlist)[:20]))
40
'external_url': util.get_config().get('external_url'),
41
'branch_name': util.get_config().get('branch_name'),
45
'scan_url': '/changes',
46
'updated': entries[0].date.isoformat() + 'Z',