[Grok-dev] grok.local_utility is not registering anything in the app

Vanderson Mota dos Santos vanderson.mota at gmail.com
Thu Feb 19 14:09:16 EST 2009


At a casual glance, the code looks OK (except "super(Aquisicao, self)"
should be calling "MyApp" instead?

Indeed. I've just changed the names to english, but i forgot to put the
super(MyApp, self)

"(..)gotcha that might be tripping you up is that Local utilities are
only instantiated when an instance of MyApp is created. If you've
already made an instance of MyApp for testing, and then you add the
grok.local_utility code later, you'll need to create a new app from
the Grok Admin screen (or if you have a production app with lots of
data (...)

I know this, but the tests are failing. And i'm running them with the
functional layer. Every time i run the tests, a new instance is
created(obviously), so, the local_utilities should be accessible.

thanks!


2009/2/19 Kevin Teague <kevin at bud.ca>

> At a casual glance, the code looks OK (except "super(Aquisicao, self)"
> should be calling "MyApp" instead?).
>
> One gotcha that might be tripping you up is that Local utilities are
> only instantiated when an instance of MyApp is created. If you've
> already made an instance of MyApp for testing, and then you add the
> grok.local_utility code later, you'll need to create a new app from
> the Grok Admin screen (or if you have a production app with lots of
> data, you can write a migration script to add the local utilities).
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev
>



-- 
Vanderson Mota dos Santos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20090219/13d7bd9d/attachment.html 


More information about the Grok-dev mailing list