Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Doc for new feature

  • Loading branch information...
commit 446063172aeeb0baa84e81c35b39daed35986dd0 1 parent f2ac1a8
Tatiana Al-Chueyr authored March 28, 2013
20  README.md
Source Rendered
@@ -44,6 +44,26 @@ class MyHandler(CorsMixin, RequestHandler):
44 44
     ...
45 45
 ```
46 46
 
  47
+Advanced
  48
+--------
  49
+
  50
+By default, CorsMixin defines "options" method using the decorator
  51
+"asynchronous" from "tornado.web".
  52
+
  53
+If your project customizes this decorator for some purpose (eg. usage of
  54
+greenlets), CorsMixin allows such customization in options wrapper.
  55
+
  56
+Usage:
  57
+
  58
+```
  59
+# custom_wrapper was previously defined
  60
+
  61
+from tornado_cors import custom_decorator
  62
+custom_decorator.wrapper = custom_wrapper
  63
+
  64
+```
  65
+
  66
+
47 67
 ## License
48 68
 
49 69
 Tornado CORS is licensed under the MIT License:
2  tests/test_tornado_cors.py
@@ -6,7 +6,7 @@
6 6
 from tornado.web import Application, asynchronous, RequestHandler
7 7
 
8 8
 import tornado_cors as cors
9  
-from tornado_cors import  custom_decorator
  9
+from tornado_cors import custom_decorator
10 10
 
11 11
 
12 12
 passed_by_custom_wrapper = False

0 notes on commit 4460631

Please sign in to comment.
Something went wrong with that request. Please try again.