L'itinéraire d'index fonctionne quand je vais à/home/indexPourquoi mon itinéraire ne fonctionne-t-il pas?
Mais ça ne marche pas pourquoi je tape/home/test
Quel est le problème ici, très confus!
exploitation forestière d'importation
de pylones demande d'importation, la réponse, session, tmpl_context comme c, url de pylons.controllers.util import Abandonner, rediriger
de BaseController import helloworld.lib.base, rendre
log = logging.getLogger (nom)
classe 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'
Je reçois cette erreur:
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
Avez-vous redémarré Pylônes? –
oui, plus je charge le serveur avec --reload – Blankman