Hello:

I'm new using python and web2py, and I think that web2py is great!!!.
I'm making some tests but now I have some problems!!!

I want to  make some plugins  to be used in all the applications, and
I think the use of modules will be the solution. In the modules
directory I made a file that I called "modulo.py" and I wrote this:

def mi_funcion():
   print "una funcion"
   return "hello"

And then I import the module using this:

import applications.blog.modules.modulo as modulo

And the module works fine!!!

But when I use db and SQLDB in the module to create the database and
to use the database I received an error:
the SQLDB in not defined.

If somebody know how to fix this problem, or can give me a detailed
explanation, to fix this will be appreciated

Thank you,

Best regards,

Victor.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to