diff --git a/README.md b/README.md index 2b19e2b..b1a2abc 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,26 @@ class MyHandler(CorsMixin, RequestHandler): ... ``` +Advanced +-------- + +By default, CorsMixin defines "options" method using the decorator +"asynchronous" from "tornado.web". + +If your project customizes this decorator for some purpose (eg. usage of +greenlets), CorsMixin allows such customization in options wrapper. + +Usage: + +``` +# custom_wrapper was previously defined + +from tornado_cors import custom_decorator +custom_decorator.wrapper = custom_wrapper + +``` + + ## License Tornado CORS is licensed under the MIT License: diff --git a/tests/test_tornado_cors.py b/tests/test_tornado_cors.py index 9074403..de85ef8 100644 --- a/tests/test_tornado_cors.py +++ b/tests/test_tornado_cors.py @@ -6,7 +6,7 @@ from tornado.web import Application, asynchronous, RequestHandler import tornado_cors as cors -from tornado_cors import custom_decorator +from tornado_cors import custom_decorator passed_by_custom_wrapper = False