From 7d2953b38948aa3f0cad5e5eb7a7937957b51a01 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Sat, 27 May 2017 11:50:00 +0300 Subject: [PATCH] Add throttles.py for DRF --- members/throttles.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 members/throttles.py diff --git a/members/throttles.py b/members/throttles.py new file mode 100644 index 0000000..0c1e17b --- /dev/null +++ b/members/throttles.py @@ -0,0 +1,9 @@ +from rest_framework.throttling import UserRateThrottle + + +class BurstRateThrottle(UserRateThrottle): + scope = 'burst' + + +class SustainedRateThrottle(UserRateThrottle): + scope = 'sustained'