我使用金字塔框架,我的网站工作在https模式。在
我改变了未找到的视图-它工作正常,用户看到我的“完美”404页面。在
但是当用户加载http://example.com页(不是https)时,用户看到404默认页(不是myfine_404)。在
如果我的网站在https模式下工作,如何更改http方案的未找到视图?在
一些代码:
在中更改未找到的视图视图.py公司名称:
@notfound_view_config(renderer='mysite:templates/my_fine_404.pt')
def not_found(request):
request.response.status = 404
return {'content': u'Sorry, page not found.'}
https的*.ini中的设置:
^{pr2}$
目前没有回答
相关问题 更多 >
编程相关推荐