Jean-Denis Girard schrieb:
> I should have mentioned that I have read this page, and downloaded both
> examples, but still can't achieve what I want... The examples show basic
> SQLAlchemy usage, or data taken from a list, but nothing using
> SQLAlchemy data in the controller before passing altered data to the
> template. Or maybe I can't read.

That shouldn't make a difference. Just alter the data before passing it 
to the template. You can add attributes to your SQLAlchemy model objects 
as you like. Or better, add a method or property to your SQLAlchemy 
model class that computes the required value. It does not make any 
difference to grid widgets and pagination whether the values are columns 
from the database or computed. As another option, you can also use your 
own getter method in the data grid.

The demos are actually for SQLObject, but it works quite similarly with 
SQLAlchemy. They have examples for both options: Custom properties (e.g. 
_get_num_members) and custom getter methods (creating the ImageLinks).

-- Christoph


--~--~---------~--~----~------------~-------~--~----~
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