Using web2py on Eclipse
I am trying to use the steps I found on the net to make web2py work on Eclipse, but I must have something setup wrong because Eclipse gives me error on the imports.
For instance the instructions say to do this at the top of controllers:
if 0:
from gluon.globals import *
from gluon.html import *
from gluon.http import *
from gluon.tools import *
from gluon.sql import *
from gluon.validators import *
from gluon.languages import translator as T
from gluon.sqlhtml import SQLFORM, SQLTABLE, form_factory
session = Session()
request = Request()
response = Response()
crud = Crud()
db = DAL(‘sqlite://storage.sqlite’)
auth=Auth(globals(),None)
Eclipse says T is an unresolved import. If I change it to translator (instead of translator as T) it says translator is in unresolved import.
Also it says SQLFORM, SQLTable, form_factory, Session(), Request(), Response etc, are unresolved imports?开发者_运维技巧 Any ideas what I am doing wrong before I switch to Django.
Do these steps first.
Then do what I have above. Urghhh
精彩评论