Merge pull request #1 from decadenza/decadenza-patch-1-throttling-rates-docs

Update throttling.md as per discussion https://github.com/encode/django-rest-framework/discussions/9639
This commit is contained in:
decadenza 2025-01-30 09:51:04 +00:00 committed by GitHub
commit 6fd8cd7f56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,7 +45,7 @@ The default throttling policy may be set globally, using the `DEFAULT_THROTTLE_C
} }
} }
The rate descriptions used in `DEFAULT_THROTTLE_RATES` may include `second`, `minute`, `hour` or `day` as the throttle period. The rates used in `DEFAULT_THROTTLE_RATES` can be specified over a period of second, minute, hour or day. The period must be specified after the `/` separator using `s`, `m`, `h` or `d`, respectively. For increased clarity, extended units such as `second`, `minute`, `hour`, `day` or even abbreviations like `sec`, `min`, `hr` are allowed, as only the first character is relevant to identify the rate.
You can also set the throttling policy on a per-view or per-viewset basis, You can also set the throttling policy on a per-view or per-viewset basis,
using the `APIView` class-based views. using the `APIView` class-based views.