17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
from loggerhead import util
26
class AtomUI (object):
28
def __init__(self, branch):
33
@turbogears.expose(template='loggerhead.templates.atom', format="xml", content_type="application/atom+xml")
34
def default(self, *args):
35
h = self._branch.get_history()
39
pagesize = int(self._branch.config.get('pagesize', '20'))
41
revid_list = h.get_file_view(h.last_revid, None)
42
entries = list(h.get_changes(list(revid_list)[:pagesize]))
45
'branch': self._branch,
49
'updated': entries[0].date.isoformat() + 'Z',
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',