added json output format :: usage url?json=1

This commit is contained in:
2010-04-14 18:01:57 -07:00
parent b2b4cd0cfb
commit 8b9bfb453e
4 changed files with 96 additions and 3 deletions

View File

@@ -58,6 +58,8 @@ class Builds(models.Model):
return datetime.fromtimestamp(self.starttime)
def changeset_link(self):
return '<a href="%s/rev/%s">%s</a>' % ("http://hg.mozilla.org/mozilla-central", self.changeset, self.changeset)
def json_changeset_link(self):
return "%s/rev/%s" % ("http://hg.mozilla.org/mozilla-central", self.changeset)
def tinderbox_link(self):
if self.logfile:
return "http://tinderbox.mozilla.org/showlog.cgi?log=%s/%s" % (self.tree.name, self.logfile)