Browse files

Doc for new feature

  • Loading branch information...
1 parent f2ac1a8 commit 446063172aeeb0baa84e81c35b39daed35986dd0 @tatiana tatiana committed Mar 28, 2013
Showing with 21 additions and 1 deletion.
  1. +20 −0 README.md
  2. +1 −1 tests/test_tornado_cors.py
View
20 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:
View
2 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

0 comments on commit 4460631

Please sign in to comment.