[Buildbot-devel] jinja template

Jean-Michel Beuken jean-michel.beuken at uclouvain.be
Fri Jul 15 08:08:33 UTC 2011


Thanks  Amber : it works...I should have thought :-[

with your info, I looked for a little bit more and finally, I found in "buildbot/status/web/base.py" :

----------------------------
# jinja utilities

def createJinjaEnv(revlink=None, changecommentlink=None, repositories=None, projects=None):
...
     default_loader = jinja2.PackageLoader('buildbot.status.web', 'templates')
*root = os.path.join(os.getcwd(), 'templates')*
     loader = jinja2.ChoiceLoader([jinja2.FileSystemLoader(root), default_loader])
     env = jinja2.Environment(loader=loader,
                              extensions=['jinja2.ext.i18n'],
                              trim_blocks=True,
                              undefined=AlmostStrictUndefined)
....
----------------------------

but, perhaps, some words concerning this feature in "7.5.1 Jinja Web Templates"  section
in buildbot's doc should be usefull...
perhaps also, create "templates" folder during buildbot installation should be helpfull...

thanks again

jmb

> Create a directory called templates in the master's main directory (where its buildbot.tac is).
>
> ~Amber (sent from Droid, please forgive any typos!)
>
> On Jul 14, 2011 10:57 AM, "Jean-Michel Beuken" <jean-michel.beuken at uclouvain.be <mailto:jean-michel.beuken at uclouvain.be>> wrote:
> > Hello,
> >
> > I want to customize the jinja templates found in "buildbot/status/web/templates/*" like waterfall.html
> > and I don't want to lost the modifications during the next update...
> >
> > I'm looking for some infos in the doc and in the sources...but nothing relevant...for me:-[
> > I read the "http://trac.buildbot.net/ticket/871" where we can read :
> >
> > ----
> > When a user wants to customize the default "layout.html" template (as an example) he/she has to copy it from the source code and modify it in the master's 'templates' directory.
> > ----
> >
> > where/what is the "master's 'templates' directory" ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20110715/e342b5e9/attachment.html>


More information about the devel mailing list