class documentation

Undocumented

Class Method as_view Store the original class on the view function.
Method check_object_permissions Check if the request should be permitted for a given object. Raises an appropriate exception if the request is not permitted.
Method check_permissions Check if the request should be permitted. Raises an appropriate exception if the request is not permitted.
Method check_throttles Check if request should be throttled. Raises an appropriate exception if the request is throttled.
Method determine_version If versioning is being used, then determine any API version for the incoming request. Returns a two-tuple of (version, versioning_scheme)
Method dispatch `.dispatch()` is pretty much the same as Django's regular dispatch, but with extra hooks for startup, finalize, and exception handling.
Method finalize_response Returns the final response object.
Method get_authenticate_header If a request is unauthenticated, determine the WWW-Authenticate header to use for 401 responses, if any.
Method get_authenticators Instantiates and returns the list of authenticators that this view can use.
Method get_content_negotiator Instantiate and return the content negotiation class to use.
Method get_exception_handler Returns the exception handler that this view uses.
Method get_exception_handler_context Returns a dict that is passed through to EXCEPTION_HANDLER, as the `context` argument.
Method get_format_suffix Determine if the request includes a '.json' style format suffix
Method get_parser_context Returns a dict that is passed through to Parser.parse(), as the `parser_context` keyword argument.
Method get_parsers Instantiates and returns the list of parsers that this view can use.
Method get_permissions Instantiates and returns the list of permissions that this view requires.
Method get_renderer_context Returns a dict that is passed through to Renderer.render(), as the `renderer_context` keyword argument.
Method get_renderers Instantiates and returns the list of renderers that this view can use.
Method get_throttles Instantiates and returns the list of throttles that this view uses.
Method get_view_description Return some descriptive text for the view, as used in OPTIONS responses and in the browsable API.
Method get_view_name Return the view name, as used in OPTIONS responses and in the browsable API.
Method handle_exception Handle any exception that occurs, by returning an appropriate response, or re-raising the error.
Method http_method_not_allowed If `request.method` does not correspond to a handler method, determine what kind of exception to raise.
Method initial Runs anything that needs to occur prior to calling the method handler.
Method initialize_request Returns the initial request object.
Method options Handler method for HTTP 'OPTIONS' request.
Method perform_authentication Perform authentication on the incoming request.
Method perform_content_negotiation Determine which renderer and media type to use render the response.
Method permission_denied If request is not permitted, determine what kind of exception to raise.
Method raise_uncaught_exception Undocumented
Method throttled If request is throttled, determine what kind of exception to raise.
Class Variable schema Undocumented
Instance Variable args Undocumented
Instance Variable format_kwarg Undocumented
Instance Variable headers Undocumented
Instance Variable kwargs Undocumented
Instance Variable request Undocumented
Instance Variable response Undocumented
Property allowed_methods Wrap Django's private `_allowed_methods` interface in a public property.
Property default_response_headers Undocumented
Instance Variable _negotiator Undocumented
@classmethod
def as_view(cls, **initkwargs): (source)

Store the original class on the view function. This allows us to discover information about the view when we do URL reverse lookups. Used for breadcrumb generation.

def check_object_permissions(self, request, obj): (source)

Check if the request should be permitted for a given object. Raises an appropriate exception if the request is not permitted.

def check_permissions(self, request): (source)

Check if the request should be permitted. Raises an appropriate exception if the request is not permitted.

def check_throttles(self, request): (source)

Check if request should be throttled. Raises an appropriate exception if the request is throttled.

def determine_version(self, request, *args, **kwargs): (source)

If versioning is being used, then determine any API version for the incoming request. Returns a two-tuple of (version, versioning_scheme)

def dispatch(self, request, *args, **kwargs): (source)

`.dispatch()` is pretty much the same as Django's regular dispatch, but with extra hooks for startup, finalize, and exception handling.

def finalize_response(self, request, response, *args, **kwargs): (source)

Returns the final response object.

def get_authenticate_header(self, request): (source)

If a request is unauthenticated, determine the WWW-Authenticate header to use for 401 responses, if any.

def get_authenticators(self): (source)

Instantiates and returns the list of authenticators that this view can use.

def get_content_negotiator(self): (source)

Instantiate and return the content negotiation class to use.

def get_exception_handler(self): (source)

Returns the exception handler that this view uses.

def get_exception_handler_context(self): (source)

Returns a dict that is passed through to EXCEPTION_HANDLER, as the `context` argument.

def get_format_suffix(self, **kwargs): (source)

Determine if the request includes a '.json' style format suffix

def get_parser_context(self, http_request): (source)

Returns a dict that is passed through to Parser.parse(), as the `parser_context` keyword argument.

def get_parsers(self): (source)

Instantiates and returns the list of parsers that this view can use.

def get_permissions(self): (source)

Instantiates and returns the list of permissions that this view requires.

def get_renderer_context(self): (source)

Returns a dict that is passed through to Renderer.render(), as the `renderer_context` keyword argument.

def get_renderers(self): (source)

Instantiates and returns the list of renderers that this view can use.

def get_throttles(self): (source)

Instantiates and returns the list of throttles that this view uses.

def get_view_description(self, html=False): (source)

Return some descriptive text for the view, as used in OPTIONS responses and in the browsable API.

def get_view_name(self): (source)

Return the view name, as used in OPTIONS responses and in the browsable API.

def handle_exception(self, exc): (source)

Handle any exception that occurs, by returning an appropriate response, or re-raising the error.

def http_method_not_allowed(self, request, *args, **kwargs): (source)

If `request.method` does not correspond to a handler method, determine what kind of exception to raise.

def initial(self, request, *args, **kwargs): (source)

Runs anything that needs to occur prior to calling the method handler.

def initialize_request(self, request, *args, **kwargs): (source)

Returns the initial request object.

def options(self, request, *args, **kwargs): (source)

Handler method for HTTP 'OPTIONS' request.

def perform_authentication(self, request): (source)

Perform authentication on the incoming request. Note that if you override this and simply 'pass', then authentication will instead be performed lazily, the first time either `request.user` or `request.auth` is accessed.

def perform_content_negotiation(self, request, force=False): (source)

Determine which renderer and media type to use render the response.

def permission_denied(self, request, message=None, code=None): (source)

If request is not permitted, determine what kind of exception to raise.

def raise_uncaught_exception(self, exc): (source)

Undocumented

def throttled(self, request, wait): (source)

If request is throttled, determine what kind of exception to raise.

Undocumented

format_kwarg = (source)

Undocumented

Undocumented

Undocumented

Undocumented

response = (source)

Undocumented

@property
allowed_methods = (source)

Wrap Django's private `_allowed_methods` interface in a public property.

@property
default_response_headers = (source)

Undocumented

_negotiator = (source)

Undocumented