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

Method determine_version

rest_framework/views.py:379–387  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

377 self.throttled(request, duration)
378
379 def determine_version(self, request, *args, **kwargs):
380 """
381 If versioning is being used, then determine any API version for the
382 incoming request. Returns a two-tuple of (version, versioning_scheme)
383 """
384 if self.versioning_class is None:
385 return (None, None)
386 scheme = self.versioning_class()
387 return (scheme.determine_version(request, *args, **kwargs), scheme)
388
389 # Dispatch methods
390

Callers 1

initialMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected