1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00

Support 202201 (#1111)

* remove survey notifications

* substantially rate limit unauthenticated /api/ queries to encourage authenticated queries #853

* move api throttle class configuration to settings (#853)

* #722 with a more generic validation approach

* Add organisations and registered users to "Global System Statistics" in footer #620

* poetry relock

* linting

* regen docs

* fix test data

Co-authored-by: Stefan Pratter <stefan@20c.com>
Co-authored-by: David Poarch <dpoarch@20c.com>
This commit is contained in:
Matt Griswold
2022-02-08 13:14:27 -06:00
committed by GitHub
parent 7fea18af92
commit e2619a001f
62 changed files with 946 additions and 296 deletions

View File

@@ -1,4 +1,4 @@
Generated from rest_throttles.py on 2022-01-11 07:58:24.072700
Generated from rest_throttles.py on 2022-02-07 09:42:46.681191
# peeringdb_server.rest_throttles
@@ -7,6 +7,48 @@ Custom rate limit handlers for the REST API.
# Classes
---
## APIAnonUserThrottle
```
APIAnonUserThrottle(rest_framework.throttling.AnonRateThrottle)
```
Rate limiting for anonymous users.
### Methods
#### allow_request
`def allow_request(self, request, view)`
Implement the check to see if the request should be throttled.
On success calls `throttle_success`.
On failure calls `throttle_failure`.
---
## APIUserThrottle
```
APIUserThrottle(rest_framework.throttling.UserRateThrottle)
```
Rate limiting for authenticated users.
### Methods
#### allow_request
`def allow_request(self, request, view)`
Implement the check to see if the request should be throttled.
On success calls `throttle_success`.
On failure calls `throttle_failure`.
---
## FilterDistanceThrottle
```