♻️(backend) extract throttling classes into a module

Extract throttling classes into a dedicated Python module, following the
structure of suitenumerique/docs.

This is a preparatory refactor to ease upcoming changes to the throttling
implementation. No functional behavior change is introduced in this commit.
This commit is contained in:
lebaudantoine
2026-02-09 14:44:39 +01:00
committed by aleb_the_flash
parent 3887255e9c
commit 23de7e52bc
2 changed files with 18 additions and 16 deletions
+14
View File
@@ -0,0 +1,14 @@
"""Throttling modules for the API."""
from rest_framework import throttling
class RequestEntryAnonRateThrottle(throttling.AnonRateThrottle):
"""Throttle Anonymous user requesting room entry"""
scope = "request_entry"
class CreationCallbackAnonRateThrottle(throttling.AnonRateThrottle):
"""Throttle Anonymous user requesting room generation callback"""
scope = "creation_callback"