17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
from loggerhead.controllers import TemplatedBranchView
23
class AtomUI (TemplatedBranchView):
25
template_path = 'loggerhead.templates.atom'
27
def get_values(self, h, args, kw, headers):
28
pagesize = int(20)#self._branch.config.get('pagesize', '20'))
30
revid_list = h.get_file_view(h.last_revid, None)
31
entries = list(h.get_changes(list(revid_list)[:pagesize]))
33
headers['Content-Type'] = 'application/atom+xml'
36
'updated': entries[0].date.isoformat() + 'Z',
22
from loggerhead import util
23
from loggerhead.templatefunctions import templatefunctions
26
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)