> I think the best way to handle that would be to create a mapper
> extension that uses the create_instance method to override the
> standard behaviour. You could then make sure that the score property
> gets applied if it's available in the rows given to the mapper.
It works, I've implemented create_instance as:
def create_instance(self, mapper, selectcontext, row, class_):
w = class_() #1
w.score = row[len(row)-1] #2
return w #3
Now, I create my own mapper object (#1), and set a score attribute
(#2). After that I return an initiated object (#3).
It works!
Thank you very much!!!
Loucash
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---