首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > perl python >

web.py朋友异常

2013-03-10 
web.py朋友错误/template/index.html的代码:import webrender web.template.render(templates/)urls

web.py朋友错误
/template/index.html的代码:
import web
render = web.template.render('templates/')
urls = ( '/(.*)', 'index')
app = web.application(urls, globals(), autoreload=False)
class index:
    def GET(self,name):
        name = 'Bob'
        return render.index(name)
if __name__ == "__main__":
    app=web.application(urs,globs())
    app.run()

 

/template/index.html

$def with(name)
$if name:
    I just wanted to say <em>hello</em> to $name.
$else:
    <em>hello</em>,world!
 结果:
<type “exception,AttributeError”>at/
No template named index

求解释! web.py import
[解决办法]
漏了?

if __name__ == "__main__":
    app=web.application(urls,globs())

热点排行