1
0
mirror of https://github.com/peeringdb/peeringdb.git synced 2024-05-11 05:55:09 +00:00
Files
peeringdb-peeringdb/docs/dev/modules/maintenance.py.md
Matt Griswold 8ef76dc5ab Support 202110 (#1085)
* Block registering private ASN ranges

* Add a continental region field for facilities #1007

* Incorrect order of search results #232

* Allow users to upload a small logo to their record #346

* Sponsor badge CSS and text translation issues #453

* IXP and Facility summary #18

* Add sales email and phone contact to ix object #949

* Increase timeout timer for IX-F JSON importer to 30s #962

* IX-F manually triggered import bugs #1054

* remove survey notifications

* IX-F importer: manual add followed by IX-F prompted add can result in "The server rejected your data" #807

* performance fix for net view

* api documentation generate broken #956

* fix poc set missing from net view

* Auto focus cursor on search field on main website #695

* PeeringDB website has a poor choice of line-breaks for IPv6 addresses. #748

* Delete childless org objects #838

* linting

* poetry lock

* re-add mistakingly dropped translation to email template

* fix template variables

* regen docs

* regen api docs

* fix merge cruft

* django-peeringdb to 2.11 and poetry relock

* linting

* comment out django-peeringdb volume mount

* add missing declaration

Co-authored-by: Stefan Pratter <stefan@20c.com>
Co-authored-by: David Poarch <dpoarch@20c.com>
2021-11-09 09:47:38 -06:00

84 lines
1.2 KiB
Markdown

Generated from maintenance.py on 2021-11-02 10:01:21.611533
# peeringdb_server.maintenance
Django middleware to handle maintenance mode.
# Functions
---
## active
`def active()`
Return True if maintenance mode is currently active.
---
## off
`def off()`
Turn maintenance mode off.
---
## on
`def on(timeout=None)`
Turn maintenance mode on.
Keyword Arguments:
- timeout<int=None>: if specified will automatically
end maintenance mode after n seconds
---
## raise_if_active
`def raise_if_active()`
Raise ActionBlocked exception if maintenance mode is active.
---
# Classes
---
## ActionBlocked
```
ActionBlocked(builtins.Exception)
```
Common base class for all non-exit exceptions.
### Methods
#### \__init__
`def __init__(self)`
Initialize self. See help(type(self)) for accurate signature.
---
## Middleware
```
Middleware(builtins.object)
```
Middleware will return 503 json responses for all write
ops (POST PUT PATCH DELETE).
### Methods
#### \__call__
`def __call__(self, request)`
Call self as a function.
---
#### \__init__
`def __init__(self, get_response=None)`
Initialize self. See help(type(self)) for accurate signature.
---