No, it's all happening in the controller, but i'm using a lot of 'for
i in Person.select()' type things.  I've also set up some trinary
relationship types in which i define a relationship class which has
two objects which are related and a relationship type.  This requires
retrieving a set of relationships (usually by filtering on two of the
3 properties) and then retrieving the the related object - for example
if i had classes for people and familial relationships i could relate
two people as being in a parent-child relationship or a granparent-
grandchild relationship, i would then search for all relationships
which include a certain person of the type parent-child and then
retrieve (based on the returned relationships) the persons children.
I know this is sort of contorted, but it allows me to have user-
defined relationship types.

-Ryan

On May 19, 9:52 pm, Matthew Bevan <[EMAIL PROTECTED]> wrote:
> Woh... you're pulling data, then pulling more data based on the
> previous data in the -template-?  Try splitting out that logic into
> the controller method.  I avoid pulling new data in my templates like
> the plague -- it's only a side note that requesting specific columns
> for some of my objects fires off additional SQL queries.
>
> On 19-May-07, at 9:31 AM, kerinin wrote:
>
>
>
> > Thanks, that may help.  Part of my problem may be that my data model
> > is highly interconnected, and a lot of my templates require pulling
> > large amounts of data from the database, and then using that
> > information to pull more information out.  I'm going to try caching
> > some of my classes and rewriting the templates in cheetah - I'll post
> > an update when I've tried that.
>
> Matthew Bevan, Systems Administrator
> Top Floor Computer Systems Ltd.
>
>  smime.p7s
> 3KDownload


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to