Hi,

Any suggestions on how to handle targets inside the jinja templates?
We don't use bug.target anymore, so I've been doing:

from libbe.command.depend import get_blocks

# Determine which targets a bug has.
# First, is this bug blocking any other bugs?
targets = ''
blocks = get_blocks(self.bd, bug)
for targetbug in blocks:
    # Are any of those blocked bugs targets?
    blocker = self.bd.bug_from_uuid(targetbug.uuid)
    if blocker.severity == "target":
        targets += "%s " % blocker.summary

.. and then passing targets to the bug template.  I can't do that for
the index template (listing every bug), though.  Is there a way to run
arbitrary python from inside the jinja2 template, or (preferably) is
there a way we can we get the list of targets to be a bug attribute
rather than a function call?

Thanks,

- Chris.
-- 
Chris Ball   <[email protected]>
One Laptop Per Child

_______________________________________________
Be-devel mailing list
[email protected]
http://void.printf.net/cgi-bin/mailman/listinfo/be-devel

Reply via email to