Navigation Menu

Skip to content
This repository has been archived by the owner on Oct 17, 2019. It is now read-only.

Commit

Permalink
Doc for new feature
Browse files Browse the repository at this point in the history
  • Loading branch information
tatiana committed Mar 28, 2013
1 parent f2ac1a8 commit 4460631
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions README.md
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tornado_cors.py
Expand Up @@ -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
Expand Down

0 comments on commit 4460631

Please sign in to comment.