示例#1
0
 def __init__(self):
   HttpResponseForbidden.__init__(self)
   self.write(render_to_string('errors/http_forbidden.phtml'))
示例#2
0
 def __init__(self, request, msg):
   HttpResponseForbidden.__init__(self,'<h1>403 Forbidden</h1><p>%s</p>'%msg)
示例#3
0
 def __init__(self, message):
     DjangoHttpResponseForbidden.__init__(self,
                                          message_to_json(message),
                                          content_type='application/json')
示例#4
0
文件: errors.py 项目: ReedSIN/webapps
 def __init__(self):
   HttpResponseForbidden.__init__(self)#,msg="You don't have permission to access the requested object.")
   # Hopefully this doesn't break the error
   self.write(render_to_string('errors/http_forbidden.phtml'))
   self.write("You don't have permission to access the requested object.")