On Mar 18, 4:10 pm, Peter Dimov <[EMAIL PROTECTED]> wrote:
> I was thinking, wouldn't it be nice, simple and straightforward to pass
> python objects rather than dictionaries to the template engine.

The ticket and wiki pages already do this.

> Let's take for example the changeset page, which contains a title, a
> message, other properties and a list of file changes. A file change is
> between two nodes and has a type attribute and a list of content
> changes. The nodes have their own attributes like path and revision. The
> template file would know this structure and would know how to represent
> the objects as html content.

Yeah, the logic for displaying changesets is a bit complex and could
probably use some clean up, though I'd be cautious about trying to
move all of it into the template, since this may make parts of it more
complicated and hard to read than straight Python.  However, if you'd
be willing to submit a patch starting some refactoring on this I'm
sure one of the devs will take a look.

-- Matt Good


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to