On 27 Mar 2006, at 13:48, Robin Haswell wrote:

> *Literally* all I need from my TG app
> is the model :-)

I feed data into my model via batch processing of data files. The  
code starts like this (my project is called
"myproject" here):


# some general imports here
from sqlobject import *
from turbogears.database import PackageHub
import turbogears
from myproject.model import *
from myproject.python_irc import *

def init_database(turbogears_config):
     """setup db connection"""
     turbogears.update_config(configfile=turbogears_config,  
modulename="myproject.config")
     hub = PackageHub("myproject")
     __connection__ = hub

Call init_database, then away it goes. Something along those lines  
should work for you as well I'd
have thought. This might not be the best way of doing this mind.

Arthur

-- 
One secret of happiness is to ignore comparisons with people who are  
more successful than you are: always compare downwards, not upwards”  
- Richard Layard



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to