Sign in
There are a total of 1 posts.
2026-01-26
在 DRF 中實作範圍限制時,本文比較了兩種主流模式:ScopedRateThrottle 與 UserRateThrottle(或 SimpleRateThrottle)繼承。從實作位置、程式碼結構、擴充性與避免錯誤的角度,詳細說明何時選擇哪種寫法,並提供實際範例。