python - flask写tag页面,URL中有中文访问就出错。flask运行在windows2012 iis8下。在linux就没有这种问题
怪我咯
怪我咯 2017-04-18 10:31:20
0
0
420

我觉的是编码的问题,可是各种编码解码都上了,还是出错。

有人出现这问题么?有解决办法么?不要让我换linux下啊。。。。

@app.route('/s/<string:name>')
@app.route('/s/<string:name>/<int:pn>')
def tags(name,pn=1):
    es = es.search(index="xxxx", body={'query':{'match':{'title':name}}}, size=20)
    res = res['hits']['hits']
    return render_template('tags.html', res=res)
怪我咯
怪我咯

走同样的路,发现不同的人生

répondre à tous(0)
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!