谷歌应用引擎实用程序
turboengine的Python项目详细描述
=====
turboengine
====
google app engine实用程序使用一些django的想法。
install
----
:
git clone git://github.com/carlitux/turboengine.git
cd turboengine
python setup.py install
usage
-
创建一个setting.py文件,并可以添加变量设置但这是一些公共变量:
template路径='templates'
appnane)app name不应该是标准的python库,它们应该导入python path
template_tags_paths=[]中,但它将用于加载templatetags的功能中
error_page_path='/error/'path将被重定向的路径错误登录或注销
profile_path='/account/profile/'
要导入设置,请执行以下操作:
从TurboEngine.conf导入设置
如果要实现网站,请使用以下操作:
从TurboEngine.http导入requesthandler
从TurboEngine.decorators导入登录名
myhandler(requesthandler):
def get(self):
您可以添加请求的头或常用用法
user=self.user;如果未登录,则返回经过身份验证的user或none。代码
self.render_template(template,paramaters)
@login_required
def post(self):
…..代码
,并使用一个类似于(app.py)的文件:
来自google.appengine.ext import webapp
来自google.appengine.ext.webapp.util import run_wsgi_app
来自turboengine import url
来自turboengine.conf import settings
应用程序=webapp.wsgiapplication(url.generate_url(settings.installed_apps)),debug=settings.debug)
运行wsgi应用程序(应用程序)
turboengine.web services.application import wsgiapplication
from echoserver_server import*;此类由“python wsdl2py simpleecho.wsdl”生成,请参见http://carlitos kyo.blogspot.com/2009/12/web services python google app engine.html
#使wsdl可用于http get
wsdl=”.join(open('simpleecho.wsdl').readlines())
disco=”.join(open('simpleecho.disco').readlines())
def soap_echo(self,ps,**kw):
请求,响应=echoserver.soap_echo(self,ps,**kw)
返回请求,请求
def main():
application=wsgiapplication()
application['echoserver.asmx']=soapapplication(wsechoserver())
main()
有关如何在GAE上使用Web服务,请访问:
http://carlitos kyo.blogspot.com/2009/12/web services python google app engine.html
todo
----
turboengine
====
google app engine实用程序使用一些django的想法。
install
----
:
git clone git://github.com/carlitux/turboengine.git
cd turboengine
python setup.py install
usage
-
创建一个setting.py文件,并可以添加变量设置但这是一些公共变量:
template路径='templates'
appnane)app name不应该是标准的python库,它们应该导入python path
template_tags_paths=[]中,但它将用于加载templatetags的功能中
error_page_path='/error/'path将被重定向的路径错误登录或注销
profile_path='/account/profile/'
要导入设置,请执行以下操作:
从TurboEngine.conf导入设置
如果要实现网站,请使用以下操作:
从TurboEngine.http导入requesthandler
从TurboEngine.decorators导入登录名
myhandler(requesthandler):
def get(self):
您可以添加请求的头或常用用法
user=self.user;如果未登录,则返回经过身份验证的user或none。代码
self.render_template(template,paramaters)
@login_required
def post(self):
…..代码
,并使用一个类似于(app.py)的文件:
来自google.appengine.ext import webapp
来自google.appengine.ext.webapp.util import run_wsgi_app
来自turboengine import url
来自turboengine.conf import settings
应用程序=webapp.wsgiapplication(url.generate_url(settings.installed_apps)),debug=settings.debug)
turboengine.web services.application import wsgiapplication
from echoserver_server import*;此类由“python wsdl2py simpleecho.wsdl”生成,请参见http://carlitos kyo.blogspot.com/2009/12/web services python google app engine.html
#使wsdl可用于http get
wsdl=”.join(open('simpleecho.wsdl').readlines())
disco=”.join(open('simpleecho.disco').readlines())
def soap_echo(self,ps,**kw):
请求,响应=echoserver.soap_echo(self,ps,**kw)
返回请求,请求
def main():
application=wsgiapplication()
application['echoserver.asmx']=soapapplication(wsechoserver())
main()
有关如何在GAE上使用Web服务,请访问:
http://carlitos kyo.blogspot.com/2009/12/web services python google app engine.html
todo
----