切里皮404

2024-04-25 17:18:23 发布

您现在位置:Python中文网/ 问答频道 /正文

404未找到

The path '/getCustomer' was not found.

Traceback (most recent call last):
File "C:\Python33\virtualenviorments\cherrypro\lib\site-packages\cherrypy\_cprequest.py",      line 670, in respond
response.body = self.handler()
File "C:\Python33\virtualenviorments\cherrypro\lib\site-packages\cherrypy\lib\encoding.py", line 212, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "C:\Python33\virtualenviorments\cherrypro\lib\site-packages\cherrypy\_cperror.py", line 411, in __call__
raise self
cherrypy._cperror.NotFound: (404, "The path '/getCustomer' was not found.")

当我试图显示用户从下拉列表中选择的表时,出现此错误。。。。这是py代码

^{pr2}$

这里是html代码

<h1>{{salutation}}{{target}}</h1>
<p>Select a name from thee list:</p>

<form action='getOneCustomer' method='post'>
<u1>
<select name = 'customerName'>
        {%for n in myList%}
        <option>{{n}}</option>
        {%endfor%}
</select>
</u1>
        <p><input type='submit' value='Submit'/></p>
</form>
<p>Customer data:</p>
<table style='width:300px'>
<tr>
    <th>Id</th>
    <th>Name</th>
    <th>Email</th>
    <th>Address</th>
    <th>City</th>
</tr>
<tr>
    {%for n in customerTuple%}
    <td>{{n}}</td>
    {%endfor%}
</tr>
</table>

如何使路径正确访问?在


Tags: inpyselflibpackageslinesitecall