Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Clarify throttling rates#9639

Discussion options

In the documentation athttps://www.django-rest-framework.org/api-guide/throttling/ the allowed throttling periods are indicated assecond,minute,hour orday.

Further in the same page, an example shows, instead, the use of justmin.

Looking at the source code it is evident that just the first letter of the period is considered:

duration= {'s':1,'m':60,'h':3600,'d':86400}[period[0]]

I think this should be clarified to the user, e.g. something like:

The throttling period is specified after the/ separator by usings,m,h ord. The use of an extended unit such assecond,minute,hour orday or evensec,min,hr is allowed too (only the first character is relevant).

You must be logged in to vote

PR welcome, I remember looking at the source code myself at some point too 👍🏻

Replies: 1 comment

Comment options

PR welcome, I remember looking at the source code myself at some point too 👍🏻

You must be logged in to vote
0 replies
Answer selected bybrowniebroke
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Labels
None yet
2 participants
@decadenza@browniebroke

[8]ページ先頭

©2009-2025 Movatter.jp