On 7/5/07, iain duncan <[EMAIL PROTECTED]> wrote: > > I'm mucking around trying to automate more of my admin interface, and > wondered if anyone could tell me what the smart way to iterate through > an SA mapped objects column attributes would be. Is there a better way > than just going through all the attributes of the object checking to see > if they are the right type? >
Yes, each object should have a 'c' attribute which contains all of your columns. Each item from this iterable is a Column object as you defined it in your model. You can get all the info you need by introspecting those column objects or by using their attributes. Just dir(c) on one of the columns and you'll be able to find out a lot about them. I'm using assign_mapper here, so if you're not using it then YMMV. Lee -- Lee McFadden blog: http://www.splee.co.uk work: http://fireflisystems.com skype: fireflisystems --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

