Commit Graph

4 Commits

Author SHA1 Message Date
Alexander Botello bc26ab3319 Support either `cleanup` or `shutdown` in ASGI lifespan messages (#134)
* support either cleanup or shutdown in ASGI message

* change event_type in tests

* update docs

* fix typo

* keep  as event_type for now

* exclude line 65

* blackify

* replace cleanup with shutdown in docs
2018-10-22 15:08:04 +01:00
Alexander Botello 49f76ab5e9 Add documentation to reflect `add_event_handler` (#129)
* Update applications docs

* Update events docs

* slight reword

* make requested changes

* split into two examples
2018-10-21 08:37:29 +01:00
Oliver Tso 4a1738cb23 Fix events docs typo. (#131) 2018-10-20 13:53:11 +01:00
Tom Christie 139753f857
Add support for `app.on_event("startup")` and `app.on_event("cleanup")`. (#98)
* Push black linting into ./scripts/test Fix some annotations etc.

* Skip black on 3.7

* Fix script

* Blergh. Shell equality tests are weird

* Attempt to fix equality check

* Document 'allow_origin_regex'

* Support app.on_event('startup') and app.on_event('cleanup')

* Nicer decorator handling for on_event

* Add documentation for app.on_event()
2018-10-09 15:47:51 +01:00