Ed Leafe wrote:
>       I'd like to add a feature to the dApp object similar to that where  
> it automatically loads connection defs in a folder named 'db' if one  
> exists. IOW, if there is a directory named 'biz', do the equivalent of:
> 
> import biz
> self.biz = biz
> 
> ...so that other classes in the app can refer to  
> self.Application.biz.BizWhatever when they need to access a bizobj.  
> However, when I tried this, 'self.biz' was a reference to the  
> dabo.biz module, not the local one. I tried inserting the current  
> directory and the biz directory into the beginning of sys.path, but  
> that had no effect.
> 
>       The startup script generated by appwiz does something quite similar;  
> I wanted to move that functionality into the app object itself, so  
> that people creating apps without appwiz won't have to add that code  
> all the time.
> 
>       So what am I missing?

Not sure if this can work from within the dabo structure... it works 
from appwizard-generated apps because App.py exists in the same level as 
the app's biz package. Basically, 'import biz' first checks the 
directory where the module that is doing the import resides. So if it is 
Dabo doing the import, it is going to find dabo's biz package first, and 
Dabo doesn't have any way of knowing where the application's biz package 
is (I don't think).


-- 
pkm ~ http://paulmcnett.com


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to