I have an odd problem with Django. I have a set of objects that Im looping through in a template as you would normally. However, I need to group the items in threes. The lay
I definitely vote for creating the structure in your view and passing it on to your template in the correct form.
If you find yourself struggling with template logic then it's a sign you should be doing more of the work in your view. (this also taught me that quite a bit of my view logic needed to be pushed back into my models...)