[英]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. 我试图使用我在网上找到的步骤使web2py在Eclipse上工作,但我必须设置错误,因为Eclipse给了我导入错误。
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. Eclipse说T是一个未解决的导入。 If I change it to translator (instead of translator as T) it says translator is in unresolved import.
如果我将其更改为翻译器(而不是翻译器为T),则说翻译器处于未解析的导入状态。
Also it says SQLFORM, SQLTable, form_factory, Session(), Request(), Response etc, are unresolved imports? 它还说SQLFORM,SQLTable,form_factory,Session(),Request(),Response等是未解析的导入? Any ideas what I am doing wrong before I switch to Django.
在切换到Django之前,我有什么想法。
Do these steps first . 首先执行这些步骤 。
Then do what I have above. 然后做我上面的事情。 Urghhh
Urghhh
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.