This is what I'm doing with eclipse and pydev 2.7.5
this code snippet at the top of files:
if False: #this block helps eclipse
import gluon
from gluon import *
from db import * #repeat for all models
from menu import *
and added the web2py directory to PyDev System PYTHONPATH
Just updated to the new Eclipse Juno, and along with that pyDev.
The problem I believe is when running pyDev it does not parse the entire
app directory when the files are local to the project. It is presuming you
have done the imports for the file you're working on.
I looked around and gave t
To get eclipse/PyDev to autocomplete web2py code, after some quick trial
and error here is what worked for me:
Assuming:
the top level eclipse project dir is web2py
your_app is the name of your application inside the web2py/applications
folder:
In __init__.py of your_app folder:
if 0:
from
>
> Yes, that gets the autocomplete. Yea!
>
> The request, response, T and others still show up as errors, so I've just
> turned off code analysis.
>
I can't get code analysis to work at all, so I can't test this.
Anthony
Yes, that gets the autocomplete. Yea!
The request, response, T and others still show up as errors, so I've just
turned off code analysis.
On Wednesday, 4 April 2012 16:23:02 UTC-7, Anthony wrote:
>
> Does it work if you do the following at the top of model and controller
> files (requires lates
>
> Hi, Anthony, that's enough to avoid Eclipse marking as errors lines
> containing web2py references, but to get autocomplete working, with
> the latest web2py stable version , I need to add to my modules:
>
> if 0:
> from gluon import *
> global LOAD; LOAD = compileapp.LoadFactory()
>
2012/4/5 Anthony :
> Does it work if you do the following at the top of model and controller
> files (requires latest web2py version):
>
> if 0:
> from gluon import *
>
> If you've got db and auth objects, you could also add:
>
> from gluon.tools import Auth
> db = DAL()
> auth = Au
Does it work if you do the following at the top of model and controller
files (requires latest web2py version):
if 0:
from gluon import *
If you've got db and auth objects, you could also add:
from gluon.tools import Auth
db = DAL()
auth = Auth(db)
Anthony
On Tuesday, April
8 matches
Mail list logo