📜  django 制作自定义 403 页面 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:31.848000             🧑  作者: Mango

代码示例1
def csrf_failure(request, reason=""):    
  context = RequestContext(request)    
  response = render_to_response('error403.html', context)    
  response.status_code = 403    
  return response