* fix next redirect when using U2F 2FA auth (#1191) * Added self identifier to API * fix migrations hierarchy after merging in previous support branch * campus object Co-authored-by: Stefan Pratter <stefan@20c.com> * fix out of bound error message add city / country to campus view * fix tests * relock poetry * linting * linting * fix docs regen * regen docs * linting * refactor self entity view to support carrier and campus object types and also make it easier to support additional object types in the future * remove debug message --------- Co-authored-by: Gajanan Patil <dipaksavaliya.python@gmail.com>
1.1 KiB
Generated from api_cache.py on 2023-02-14 15:33:37.135106
peeringdb_server.api_cache
Handle loading of api-cache data.
Classes
APICacheLoader
APICacheLoader(builtins.object)
Checks if an API GET request qualifies for a cache load and if it does allows you to provide the cached result.
Methods
_init_
def __init__(self, viewset, qset, filters)
Initialize self. See help(type(self)) for accurate signature.
filter_fields
def filter_fields(self, row)
Remove any unwanted fields from the resultset
according to the fields filter specified in the request.
load
def load(self)
Load the cached response according to tag and depth.
qualifies
def qualifies(self)
Check if request qualifies for a cache load.
CacheRedirect
CacheRedirect(builtins.Exception)
Raise this error to redirect to cache response during viewset.get_queryset or viewset.list()
Argument should be an APICacheLoader instance.
Methods
_init_
def __init__(self, loader)
Initialize self. See help(type(self)) for accurate signature.