指數路線的作品,當我去到/ home /指數爲什麼我的路線不工作?
但它不工作,爲什麼我輸入的/ home /測試
什麼是錯在這裏,很迷茫!
進口測井
從塔柱導入請求,響應,會話tmpl_context爲c,URL 從pylons.controllers.util進口中止,重定向
從helloworld.lib.base進口BaseController,渲染
日誌= logging.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'
我得到這個錯誤:
WebError Traceback:
⇝ NotImplementedError: Action u'test' is not implemented
View as: Interactive | Text | XML (full)
URL: http://127.0.0.1:5000/hello/test
Module weberror.evalexception:431 in respond view
>> app_iter = self.application(environ, detect_start_response)
Module beaker.middleware:152 in __call__ view
>> return self.wrap_app(environ, session_start_response)
Module routes.middleware:131 in __call__ view
>> response = self.app(environ, start_response)
Module pylons.wsgiapp:107 in __call__ view
>> response = self.dispatch(controller, environ, start_response)
Module pylons.wsgiapp:312 in dispatch view
>> return controller(environ, start_response)
Module helloworld.lib.base:15 in __call__ view
>> return WSGIController.__call__(self, environ, start_response)
Module pylons.controllers.core:211 in __call__ view
>> response = self._dispatch_call()
Module pylons.controllers.core:168 in _dispatch_call view
>> action)
NotImplementedError: Action u'test' is not implemented
你重新啓動主塔? – 2010-09-12 16:51:00
是的,加上我加載服務器--reload – Blankman 2010-09-13 02:15:31