MCPcopy Index your code
hub / github.com/encode/django-rest-framework / initial

Method initial

rest_framework/views.py:405–422  ·  view source on GitHub ↗

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

(self, request, *args, **kwargs)

Source from the content-addressed store, hash-verified

403 )
404
405 def initial(self, request, *args, **kwargs):
406 """
407 Runs anything that needs to occur prior to calling the method handler.
408 """
409 self.format_kwarg = self.get_format_suffix(**kwargs)
410
411 # Perform content negotiation and store the accepted info on the request
412 neg = self.perform_content_negotiation(request)
413 request.accepted_renderer, request.accepted_media_type = neg
414
415 # Determine the API version, if versioning is in use.
416 version, scheme = self.determine_version(request, *args, **kwargs)
417 request.version, request.versioning_scheme = version, scheme
418
419 # Ensure that the incoming request is permitted
420 self.perform_authentication(request)
421 self.check_permissions(request)
422 self.check_throttles(request)
423
424 def finalize_response(self, request, response, *args, **kwargs):
425 """

Callers 3

dispatchMethod · 0.95
get_initialMethod · 0.80

Calls 6

get_format_suffixMethod · 0.95
determine_versionMethod · 0.95
check_permissionsMethod · 0.95
check_throttlesMethod · 0.95