MCPcopy
hub / github.com/encode/django-rest-framework / user

Method user

rest_framework/request.py:225–233  ·  view source on GitHub ↗

Returns the user associated with the current request, as authenticated by the authentication classes provided to the request.

(self)

Source from the content-addressed store, hash-verified

223
224 @property
225 def user(self):
226 """
227 Returns the user associated with the current request, as authenticated
228 by the authentication classes provided to the request.
229 """
230 if not hasattr(self, '_user'):
231 with wrap_attributeerrors():
232 self._authenticate()
233 return self._user
234
235 @user.setter
236 def user(self, value):

Callers

nothing calls this directly

Calls 2

_authenticateMethod · 0.95
wrap_attributeerrorsFunction · 0.85

Tested by

no test coverage detected