I have a module cms.py with functions that take care of setting validators 
on db and labels on form.
In that module I import:

from gluon.html import *
from gluon.validators import *

When I import cms.py in db.py:

from applications.init.modules.cms import*

I don't get a syntax warning however when I import cms.py at controller
of function level I get the following warning:

/Users/me/web2py/applications/init/controllers/default.py:68: 
SyntaxWarning: import * only allowed at module level
  def subscribe():

Why can't I import cms.py in a controller or a function?


Kind regards,

Annet

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to