OpenQuizz
Une application de gestion des contenus pédagogiques
MethodNotAllowed Class Reference
Inheritance diagram for MethodNotAllowed:
Collaboration diagram for MethodNotAllowed:

Public Member Functions

def __init__ (self, valid_methods=None, description=None)
 
def get_headers (self, environ=None)
 
- Public Member Functions inherited from HTTPException
def wrap (cls, exception, name=None)
 
def name (self)
 
def get_description (self, environ=None)
 
def get_body (self, environ=None)
 
def get_response (self, environ=None)
 
def __call__ (self, environ, start_response)
 
def __str__ (self)
 
def __repr__ (self)
 

Data Fields

 valid_methods
 
- Data Fields inherited from HTTPException
 response
 

Static Public Attributes

 code
 
 description
 
- Static Public Attributes inherited from HTTPException
 code
 
 description
 

Detailed Description

*405* `Method Not Allowed`

Raise if the server used a method the resource does not handle.  For
example `POST` if the resource is view only.  Especially useful for REST.

The first argument for this exception should be a list of allowed methods.
Strictly speaking the response would be invalid if you don't provide valid
methods in the header which you can do with that list.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  valid_methods = None,
  description = None 
)
Takes an optional list of valid http methods
starting with werkzeug 0.3 the list will be mandatory.

Reimplemented from HTTPException.

Member Function Documentation

◆ get_headers()

def get_headers (   self,
  environ = None 
)
Get a list of headers.

Reimplemented from HTTPException.

Field Documentation

◆ code

code
static

◆ description

description
static

◆ valid_methods

valid_methods

The documentation for this class was generated from the following file: