Skip to content

Commit febaa4d

Browse files
committed
Add import in docs. [ci skip]
1 parent e7eccac commit febaa4d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: docs/api-guide/throttling.md

+2
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ If the `.wait()` method is implemented and the request is throttled, then a `Ret
184184

185185
The following is an example of a rate throttle, that will randomly throttle 1 in every 10 requests.
186186

187+
import random
188+
187189
class RandomRateThrottle(throttling.BaseThrottle):
188190
def allow_request(self, request, view):
189191
return random.randint(1, 10) == 1

0 commit comments

Comments
 (0)