On 5/3/07, iain duncan <[EMAIL PROTECTED]> wrote: > > Hi folks, I'm wondering if anyone can tell what I would need to do to > make standalone python programs that are able to access the same SA > model as the tg app. Say perhaps if I want a little CGI or command line > housekeeping script to be able to use the same type of model code as my > controllers can. Evidently sticking the python script in the tg app > directory and doing > > from model import * > > is not enough. I assume I'm missing something basic in python > modules. :/
you are missing this I think: turbogears.update_config(configfile="dev.cfg", modulename="project_name.config") where dev.cfg is your config file and project_name is the name of your projects' package... for more info look into: http://docs.turbogears.org/1.0/ModelOutsideTG it works perfectly for me with SA Cheers, Florent. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

