Thanks. This ended up helping quite a bit!

I haven't gotten into multiple databases yet, but I think it should be
supported trivially

I refactored your code for re-use into this pastebin - 
https://gist.github.com/1556734

I tried to make it simpler, but there is a bit of a janky hack in
there.

1. I stripped the "ReflectedTable" down to just being an inherited
class type , and one which defines a "__tablename__"
2. The map_tables routine now just takes an app_model directory and
looks for items that have both a) inherited from ReflectedTable and b)
define "__tablename__"

To make it work, just replace models/__init__.py with this

This obviously needs a few more passes, but I'd like to really
abstract this into something that can just be a standalone module to
handle all this stuff.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to