Search code examples
pythondjangotastypiethrottling

TastyPie throttling - by user or by IP?


I can't seem to find any information on what TastyPie throttles based on. Is it by the IP of the request, or by the actual Django user object?


Solution

  • Throttle key is based on authentication.get_identifier function.

    Default implementation of this function returns a combination of IP address and hostname.

    Edit

    Other implementations (i.e. BasicAuthentication, ApiKeyAuthentication) returns username of the currently logged user or nouser string.