[sqlalchemy] Re: making crud with assign_mapper

2007-02-07 Thread svilen
If you have the time and know how, do you know what the efficient way to iterate through all the class definitions in a module would be to grab all the classes that have a certain member? import module for k,v in module.__dict__.iteritems() if isinstance(v,type): if issubclass(v,

[sqlalchemy] offlist thanks Re: [sqlalchemy] Re: making crud with assign_mapper

2007-02-07 Thread iain duncan
On Wed, 2007-07-02 at 11:53 +0200, svilen wrote: If you have the time and know how, do you know what the efficient way to iterate through all the class definitions in a module would be to grab all the classes that have a certain member? import module for k,v in

[sqlalchemy] Re: offlist thanks Re: [sqlalchemy] Re: making crud with assign_mapper

2007-02-07 Thread iain duncan
Darn, apologies to all. Clearly I am too sleepy to be doing this as I can't even work my mail client. :/ Thanks On Wed, 2007-07-02 at 01:58 -0800, iain duncan wrote: On Wed, 2007-07-02 at 11:53 +0200, svilen wrote: If you have the time and know how, do you know what the efficient way to

[sqlalchemy] Re: making crud with assign_mapper

2007-02-07 Thread Sébastien LELONG
Thanks. I've been using the inspect module but there's such a lot in there it's a bit dizzying! FWIW, you can also use ipython and its dynamic object introspection, completion, etc... This helps a *lot* finding what you want. It's also usefull to dive into the sources, precisely where you

[sqlalchemy] Re: making crud with assign_mapper

2007-02-07 Thread HD Mail
Hi Iain, I'm working on an admin interface and trying to make it generic when that will do, a la django, but more easily customizable. A couple of things I could not yet find in the SA docs, can anyone point me to the right place or if they know pipe up? - how would one ask a mapper object

[sqlalchemy] Re: making crud with assign_mapper

2007-02-07 Thread yi huang
If you have the time and know how, do you know what the efficient way to iterate through all the class definitions in a module would be to grab all the classes that have a certain member? Ie If I add this field to an orm class class Page: admin_fields = [blahblah] then I want to