[Buildbot-commits] [Buildbot] #2586: Can't override html templates in master's templates directory
Buildbot trac
trac at buildbot.net
Sun Nov 17 14:20:40 UTC 2013
#2586: Can't override html templates in master's templates directory
---------------------+--------------------
Reporter: hwoarang | Owner:
Type: defect | Status: new
Priority: major | Milestone: 0.8.9
Version: 0.8.8 | Resolution:
Keywords: web |
---------------------+--------------------
Old description:
> Hi,
>
> I am using 0.8.8 and I am not able to override the templates from
> /usr/lib64/python2.7/site-packages/buildbot/status/web/templates.
>
> What I did was to copy the root.html file from there to my master's
> templates/ directory and do some minor edits. However, the web server
> still serves the one from the /usr/lib64/python2.7/site-
> packages/buildbot/status/web/templates directory.
>
> The only way to make it load the one from my master's directory was to
> add the following in my masters.cfg file
>
> import jinja2
>
> myloaders = [
> jinja2.FileSystemLoader(dirname(__file__)+"/templates"),
> ]
>
> c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg,
> jinja_loaders = myloaders))
>
> Adding this^^^ made buildbot pick the root.html file from my master's
> templates/ directory.
>
> If you need more information please let me know
New description:
Hi,
I am using 0.8.8 and I am not able to override the templates from
/usr/lib64/python2.7/site-packages/buildbot/status/web/templates.
What I did was to copy the root.html file from there to my master's
templates/ directory and do some minor edits. However, the web server
still serves the one from the /usr/lib64/python2.7/site-
packages/buildbot/status/web/templates directory.
The only way to make it load the one from my master's directory was to add
the following in my masters.cfg file
{{{
import jinja2
myloaders = [
jinja2.FileSystemLoader(dirname(__file__)+"/templates"),
]
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg,
jinja_loaders = myloaders))
}}}
Adding this made buildbot pick the root.html file from my master's
templates/ directory.
If you need more information please let me know
--
Comment (by dustin):
hwoarang, is it possible you're using the wrong directory? The basedir
isn't necessarily the directory containing `buildbot.tac` -- the TAC file
can specify some other directory.
--
Ticket URL: <http://trac.buildbot.net/ticket/2586#comment:3>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the Commits
mailing list