On 7/20/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> As a related question:
>
> Lets say I have two templates in Model1.py and Model2.py, similar to
> the ones I've mentioned before. What if I import both to my current
> module? I could have two separate name spaces for each one, but
> Ideally I would like to combine it under one namespace in globals, ie.
> having just one metadata and objecstore that will work with the Entity
> classes from both modules. Is this possible? How could I do that?
I'm not sure I understand what you mean, but...
from Model1 import [your_class_name1]
from Model2 import [your_class_name2]
and in your models:
...
belongs_to('xxx', of_kind=[your_class_name1])
you might want to use delay_setup in that case.
--
Gaƫtan de Menten
http://openhex.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" 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/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---