On Mon, Sep 06, 2010 at 03:35:58PM -0400, Chris Ball wrote: > 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 > ...
I think we should drop the targets field and list the blocked(-by) bug status next to the id/summary in the bug.html pages. Block-ers/-ees should not be listed on the index. As I see it, the point of targets are to help you focus on getting releases out the door. All you need to be able to do that is see a list of open targets (in a severity-sorted/-filtered index on the list.html page) $ ./be list --tags --severity target bea/773:ot:: 1.0 bea/76a:ot:CFBE: beta and a page for each target listing at least the open dependencies. $ ./be depend --tree-depth 1 --show-status --show-summary /76a bea/76a blocked by: bea/04e:om: Assignee default selection is broken... bea/0a2:fm: Humanize empty result pages. ... Of course, with the increased real estate of a webpage, the dependency tree information could live on the bug.html page. > Is there a way to run arbitrary python from inside the jinja2 > template, No, and that is a good thing ;). > or (preferably) is there a way we can we get the list of targets to > be a bug attribute rather than a function call? You could use the builtin `property` to create a Bug.target property. This is probably a bad idea. You could also pass a target_string(bugdir, bug) function in to the template. This is a better idea, but I don't think targets really need special treatment, and generating the HTML in Python before passing it in to the template is not a problem for bug.html pages. -- This email may be signed or encrypted with GPG (http://www.gnupg.org). The GPG signature (if present) will be attached as 'signature.asc'. For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy My public key is at http://www.physics.drexel.edu/~wking/pubkey.txt
pgpp3GA7QrirM.pgp
Description: PGP signature
_______________________________________________ Be-devel mailing list [email protected] http://void.printf.net/cgi-bin/mailman/listinfo/be-devel
