Hello Amit! Web2py executes your code in a special environment populated with predefined objects (like request, response, T etc, http://web2py.com/books/default/chapter/29/04/the-core#API) Also web2py has special places where it looks for modules (/gluon, applications/<your application>/modules, /site-packages). These folders are not in PYTHONPATH, so your IDE cannot find them and shows errors. But web2py can find them and everything works, so this is an error only for your IDE code analyzer. This is a common problem, and there are many workarounds for different IDEs, including eclipse. Maybe this post will help you: http://www.web2py.com/AlterEgo/default/show/37
On Friday, July 20, 2012 at 9:19:29 AM UTC+4, Amit wrote: > > Hi, > I followed below link to configure Web2py project in eclipse: > > http://allisterx.blogspot.in/2009/06/using-web2py-framework-on-eclipse.html > > but after setting up when i open my application which is there inside > application folder of web2py_src folder, I saw so many errors on the module. > once i open default.py module, it showing error on import modules which > are inside Modules folder(for e.g.: i have userconf.py module inside > modules but when i import it in default.controller it giving error saying > "Unresolved import:userconf") , similar problem with when i am trying to > use function of db.py, its giving error "undefined variable". > > can anyone please help me to figure out what wrong i did? > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.

