3 messages in com.googlegroups.pylons-discussRe: Misspell elixir in SAContext
FromSent OnAttachments
Mike Orr19 Jul 2007 12:15 
Olli Wang20 Jul 2007 02:24 
Mike Orr20 Jul 2007 09:41 
Subject:Re: Misspell elixir in SAContext
From:Olli Wang (olli@public.gmane.org)
Date:07/20/2007 02:24:31 AM
List:com.googlegroups.pylons-discuss

Hi, currently I temporarily call add_engine_from_config by passing default_url parameter. It's okay, no errors about config.

But I notice one more thing, when I set up sac instance by "PylonsSAContext(strategy=ElixirStrategy)" I got a traceback said

"TypeError: unbound method create_metadata() must be called with ElixirStrategy i nstance as first argument (got str instance instead)"

So I add "()" after ElixirStrategy to make it as an instance, it works. I think you may correct it in docstring.

sac = SAContext(strategy=ElixirStrategy) => sac = SAContext(strategy=ElixirStrategy())

I'll keep trying something else, nice work, Mike, and many thanks.

On Jul 20, 3:15 am, "Mike Orr"
<slug@public.gmane.org> wrote:

On 7/18/07, Olli Wang <olli@public.gmane.org> wrote:

I just found your SAContext has a misspell of "elixir", you spell it as "exilir",

Fixed in 0.3.3. I tend to pronounce that word the other way so that's how I spelled it.

http://sluggo.scrapping.cc/python/sacontext/

Also, I have little question about how to use the ElixirStrategy. It said under

pylons we should use "sac = PylonsSAContext()", but the ElixirStrategy tells

us to use "sac = SAContext(strategy=ExilirStrategy)", that way, it is not

PylonsSAContext(), does it work fine with Pylons, too?

It should. You'll need the strategy argument.

And, could you tell me where to put the sqlalchemy config below?

sqlalchemy.default.uri = mysql://username@localhost/mydb sqlalchemy.default.echo = true sqlalchemy.default.echo_pool = false sqlalchemy.default.pool_recycle = 3600

I put it in development.ini but it seems doesn't work. :(

That's right. It appears to be a bug in Pylons or PasteDeploy that I haven't figured out; it loses the configuration in some circumstances. We can discuss it on the other thread in pylons-discuss.