On Mar 23, 2006, at 11:29 PM, Jorge Godoy wrote:
> > Ronald Jaramillo <[EMAIL PROTECTED]> writes: > >> I have uploaded a screencast (http://www.checkandshare.com/blog/? >> p=41) where I talk about some of the ideas >> for the next version of CatWalk and by extension FastData. >> Cheers. >> Ronald > > > Great idea, Ronald! But for filters I'd like to use the same > syntax as > SQLObject or Python itself. > > This brings more coherence to it with what one might need to code > in his own > code... Something like "name == 'Juanes'" instead of "'name', 'eq', > 'Juanes'". Good point. > > I also found it a bit confusing from the beginning to find out if > this is a > "down" or "up" reference in your example... Is it based on the > column name? > So, for example, can't I have something like > "model.Class.something" and have > it in a column named "anotherthing" using this "go down" or "go up" > idea? I'm not sure If I get your example, but let me try to clarify. The basic idea is that you can address fields along your table relations using an specific sql object class from your model as starting point. Say you have a model: class Person(SQLObject): name = StringCol() sex = StringCol(varchar=True,length=1) telefon=StringCol() addresses = MultipleJoin('address') class Address(SQLObject): street = StringCol() city = StringCol() person = ForeignKey('Person') You can get a view of addresses grouped by persons: list_view('Person', fields=['name', 'adresses.street','adresses.city']) The starting point for this fields is 'Person', to be more explicit you could say: list_view('Person', fields=['Person.name', 'Person.adresses.street','Person.adresses.city']) Here we retrieve a list of addresses that list the person's gender as well: list_view('Address', fields= ['street','city','person.name','person.sex']) Or even more useful: list_view('Address', fields= ['street','city','person.name','person.telefon'],filters= ["person.sex=='f'"]) Cheers. Ronald > > -- > Jorge Godoy <[EMAIL PROTECTED]> > > ________________________________ Ronald Jaramillo mail: ronald AT checkandshare DOT com blog: http://www.checkandshare.com/blog --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

