Thanks Christoph!

On Thu, Nov 17, 2011 at 9:37 AM, Christoph Zwerschke <[email protected]> wrote:

> Am 17.11.2011 17:56, schrieb Brad Holden:
>
>  Below are the model.py, the archivemodel.py, the __init__.py and the
>> dev.cfg
>>
>
> > sqlalchemy.dburi="sqlite:///**Users/holden/tg1p1env/devdata.**sqlite"
> > archive.dburi="postgresql://**holden:password@localhost/**datareduc"
>
> > mod_engine = 
> > create_engine("sqlite:////**Users/holden/tg1p1env/**tg1dreduce/devdata.sqlite",
> echo=True)
> > mod_session = scoped_session(sessionmaker(**autoflush=True))
> > mod_metadata = ThreadLocalMetaData()
>
> That looks wrong. First, why do you specify the same URIs in two places,
> the config and the model file?


Because if I don't, it fails even earlier!  Turbogears does not find the
database at all.

ERROR Error starting TurboGears extension 'identity =
turbogears.identity.visitor': (OperationalError) unable to open database
file None None

So clearly something is screwed up in my configuration.  Could you point me
to where I should be looking?






>
> options_defaults.update(**autosetup=False,
>     metadata=metadata, session=session)
>
> for your second database to
>
> options_defaults.update(**autosetup=False,
>    metadata=get_metadata('**archive'), session=session)
>
> The names metadata, get_metadata and session should be imported from
> tg.database.
>
>
Ah!  Thanks!  Of course this is discussed in the documentation and I missed
it.


>
> -- Christoph
>
> --
> 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 turbogears+unsubscribe@**
> googlegroups.com <turbogears%[email protected]>.
> For more options, visit this group at http://groups.google.com/**
> group/turbogears?hl=en <http://groups.google.com/group/turbogears?hl=en>.
>
>

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

Reply via email to