当我转到/home/index时,索引路径有效
但是为什么我打字/回家/测试都不管用
这里怎么了,很困惑!在
导入日志记录
从pylons导入请求、响应、会话、tmpl_上下文作为c、url 从pylons.controllers.util导入中止,重定向
从helloworld.lib.base导入BaseController,渲染
日志=日志记录.getLogger(名称)
类HelloController(BaseController):
def index(self):
# Return a rendered template
#return render('/hello.mako')
# or, return a string
return 'Hello World from index() action!'
def test(self):
return 'blah'
我得到这个错误:
^{pr2}$
仔细检查你的压痕。如果def test(self)与类处于相同的缩进级别,则不会出现缩进错误。
这将引发缩进错误:
这不是:
^{pr2}$相关问题 更多 >
编程相关推荐