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

Public Member Functions

def dispatch_request (self, *args, **kwargs)
 
- Public Member Functions inherited from MethodViewType
def __init__ (cls, name, bases, d)
 
- Public Member Functions inherited from View
def dispatch_request (self)
 
def as_view (cls, name, *class_args, **class_kwargs)
 

Additional Inherited Members

- Data Fields inherited from MethodViewType
 methods
 
- Static Public Attributes inherited from View
 methods
 
 provide_automatic_options
 
 decorators
 

Detailed Description

A class-based view that dispatches request methods to the corresponding
class methods. For example, if you implement a ``get`` method, it will be
used to handle ``GET`` requests. ::

    class CounterAPI(MethodView):
        def get(self):
            return session.get('counter', 0)

        def post(self):
            session['counter'] = session.get('counter', 0) + 1
            return 'OK'

    app.add_url_rule('/counter', view_func=CounterAPI.as_view('counter'))

Member Function Documentation

◆ dispatch_request()

def dispatch_request (   self,
args,
**  kwargs 
)

Reimplemented in Resource, Resource, and Resource.


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