in module
from gluon import current
class MyClass(object):
def __init__(self):
self.T = current.T
# important only assign "current" objects inside instance methods. Never do
it as class attributes or on module top level.
On Thu, Nov 24, 2011 at 5:31 PM, monotasker <[email protected]> wrote:
> I'm writing a plugin and (as recommended) putting my plugin classes in the
> modules folder. I'm using "from gluon import *" to get gluon classes in the
> module file, but I'm still getting an error message about translation
> strings: "global name 'T' is not defined". Do I need to import T from a
> specific gluon file?
>
--
Bruno Rocha
[http://rochacbruno.com.br]