Class haproxy.embed.View

Simple class-based views.

Methods

haproxy.embed.View:as_view (request, context) Initialize and immediately dispatch the view.
haproxy.embed.View:dispatch (request, context) Dispatch a request to the method handler.
haproxy.embed.View:methods () Return list of methods handled by the view.
haproxy.embed.View:new (name) Create a new named View (i.e., subclass of View).
haproxy.embed.View:options (request) Default handler for OPTIONS requests.


Methods

haproxy.embed.View:as_view (request, context)
Initialize and immediately dispatch the view. Useful for assigning a class-based view to a route.

NOTE: This is a class method, not an instance method. It does not take an implicit self argument.

Parameters:

Returns:

    haproxy.embed.Response

See also:

Usage:

    response = MyView.as_view(request, context)
haproxy.embed.View:dispatch (request, context)
Dispatch a request to the method handler.

Parameters:

Returns:

    haproxy.embed.Response

See also:

haproxy.embed.View:methods ()
Return list of methods handled by the view.

Returns:

    table list of available methods
haproxy.embed.View:new (name)
Create a new named View (i.e., subclass of View).

Parameters:

Returns:

    haproxy.embed.View
haproxy.embed.View:options (request)
Default handler for OPTIONS requests. Returns HTTP 204 No Content and a list of allowed methods.

Parameters:

Returns:

    haproxy.embed.Response
generated by LDoc 1.4.3 Last updated 2016-06-26 17:50:20