0

I am using the Bunch code from here:

And it works great. Except now I need to use Python 2.7's collections.OrderedDict and the Bunch code unorders the results.

I've taken a few swipes, but I'm not sure how to rewrite Bunch to support ordered dicts. Can anyone help? My code is here:

Community
  • 1
  • 1
aclark
  • 4,345
  • 1
  • 19
  • 31
  • As it turns out, I think I can pass dicts in to mako templates as expected. Sorry for the noise. – aclark Nov 29 '11 at 16:25

1 Answers1

0

I ended up ditching the Bunch code in favor of the following syntax:

<span class="badge mini-classifier-pop-up" data-original-title="${classifier}"
    style="background: ${colors[stub][1]}"><i class="${icon}"></i></span>
aclark
  • 4,345
  • 1
  • 19
  • 31