Thanks for the answer Oleg... I have one more question - my set up is a little more complicated than I described. I actually have this:

class SmartSQLObject(SQLObject)
  # does stuff

class foo(SmartSQLObject):
  # does stuff

class bar(SmartSQLObject):
  # does stuff

Now, "foo" and "bar" actually want to connect to different databases. But because they use the same sqlhub, when I set the connection on one, it sets the connection on the other as well (when imported into the same namespace). Is there a way to avoid that as well?

I've tried putting _connection in foo & bar but that didn't work, and I tried using __connection__ in the module, but that didn't work either. Any hints?


On 5/3/07, Dobromir Montauk <> wrote:
Hi folks,

I have two packages which are colliding. I'm doing:

from foo import Objects as JuryObjects
from bar import Objects as OptimusObjects

Now, both "JuryObjects" and "OptimusObjects" have a class "Language" (they each have their own database). I get this error:

ValueError: class Language is already in the registry (other class is <class 'foo.Objects.Language'>, from the module foo.Objects in ~foo/Objects.pyc; attempted new class is <class 'bar.Objects.Language'>, from the module bar.Objects in ~bar/Objects.pyc)

Is there any way to have the same name for this class?

Also, if I change one of the Language classes, will it work for me to import from two different databases?