On 1/21/06, Jeff Watkins <[EMAIL PROTECTED]> wrote:
> from project.model import *
> identity.soprovider.model.user= MyUser
> identity.soprovider.model.group= MyGroup
> identity.soprovider.model.permission= MyPermission
>
> However, it turns out that the model imports the identity module, which has
> a soprovider module and so the config file doesn't actually wind up with the
> right value.
>
> My temporary solution is to use the fully qualified module names:
>
> import project.model
> identity.soprovider.model.user= project.model.MyUser
> identity.soprovider.model.group= project.model.MyGroup
> identity.soprovider.model.permission=
> project.model.MyPermission
>
> This sure feels like a bug and I'll file a ticket once Trac comes back
> online.

That's not a bug. The config file is a Python module and "from blah
import *" will have the same pitfalls it always does. You could define
__all__ in that module to ensure that you don't get more than you
bargain for, or do it the way that Michele suggests.

Kevin

Reply via email to