display context variables values in the "templates" panel #18

Merged
merged 4 commits into from Feb 23, 2012

Projects

None yet

2 participants

@mattoufoutu
Contributor

The attached pull request makes the templates panel display the values of context variables instead of just listing them.
(Also fixes tables display which didn't have alternately colored rows)

@mgood

What is outer_loop for? Doesn't look like it's used now.

Owner

It is to be able to use loop.cycle() within the inner loop, without this the tr's class would be 'flDebugOdd' for each one (don't ask me why, but it works, i had this tip from the #pocoo channel ^^)

I can't reproduce that. If I take out the outer_loop variable I still get the alternating rows. I'm using Jinja2 2.6, but maybe some versions have a bug?

@mgood

You could use template.context|dictsort here to order the variables.

Owner
mgood commented Feb 23, 2012

Look pretty good. There's an outer_loop that you're setting in the template that I don't see used. Can you remove that?

Contributor

Haha, now I can't reproduce this outer_loop bug either, whatever, it's now deleted.

@mgood mgood merged commit 7e8a8e2 into mgood:master Feb 23, 2012
Owner
mgood commented Feb 23, 2012

Ok, thanks. Thanks for the template cleanup too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment