Closed ghost closed 6 years ago
Argh! Just saw this assigned to me. Will take a look soon.
Documenting and saving the links as I read about it: http://django-rest-framework.org/examples/permissions.html
Assuming that we do not need authentication and only throttling support.
Yes throttling only.
I am adding a base setting in the main settings.py which I can import in the server_talk settings.py, which eventually will be included in the views.py for each view Class.
Does that sound good to you? I will keep a default base value of 50 requests per minute.
50 sounds good, we can adjust the base default after testing.
To keep consistency add the new setting to apps/server_talk/conf/settings.py
DEFAULT_REQUESTS_PER_MINUTE = 50
REQUESTS_PER_MINUTE = getattr(settings, 'THROTTLING_REQUEST_PER_MINUTE', DEFAULT_REQUESTS_PER_MINUTE)
I have pushed some code. I will need to test this though and will need your help in how to do that.
The package used for the API (http://django-rest-framework.org/) supports this, find out how it works and enabled it with sensible defaults expose it via new config option(s)