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()
30
pagesize = int(util.get_config().get('pagesize', '20'))
32
revlist, start_revid = h.get_navigation(None, None)
33
entries = list(h.get_changelist(list(revlist)[:pagesize]))
36
'external_url': util.get_config().get('external_url'),
37
'branch_name': util.get_config().get('branch_name'),
41
'scan_url': '/changes',
42
'updated': entries[0].date.isoformat() + 'Z',