thanks M.
I mis-thought that with 'db' being global it would be available to
modules.
thanks for clarifying.
(sorry for the basic Python question)

On May 20, 7:23 pm, mdipierro <[email protected]> wrote:
> your module is a module and only sees things that are imported.
> You must pass db to the function that you import so that they can use
> it.
>
> On May 20, 11:24 am, Carl <[email protected]> wrote:
>
>
>
> > I've created my own module and placed it in applications/myapp/modules
>
> > In default.py I've added import
> > applications.myappliance.modules.mymodule as mymodule
>
> > In mymodule.py I reference db but db isn't accessible. The ticket
> > states "global name 'db' is not defined".
>
> > What am I missing in mymodule.py? And are there any other statements/
> > imports that are generally needed?
>
> > thanks
>
> > Carl
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to