Skip to content

Commit

Permalink
Merge remote-tracking branch 'orig/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilja Orlovs committed Sep 11, 2014
2 parents 62c6333 + c273d58 commit fe4276b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions cyclone/mail.py
Expand Up @@ -49,6 +49,7 @@ class Message(object):
from_addr="root@localhost",
to_addrs=["user1", "user2", "user3"],
subject="Test, 123",
message="Hello thar!",
mime="text/html")
"""

Expand Down
8 changes: 5 additions & 3 deletions cyclone/web.py
Expand Up @@ -808,7 +808,9 @@ def write_error(self, status_code, **kwargs):
In order for error pages to be generated for paths that do not match any
handlers, you can use the `error_handler` keyword argument when
instantiating the ``cyclone.web.Application`` object. For example:
instantiating the ``cyclone.web.Application`` object.
For example::
import cyclone.web
import httplib
Expand All @@ -831,15 +833,15 @@ class CustomErrorHandler(CustomErrorPageMixin, cyclone.web.ErrorHandler):
class BaseHandler(CustomErrorPageMixin, cyclone.web.RequestHandler):
...
Then, when constructing the ``cyclone.web.Application`` object:
Then, when constructing the ``cyclone.web.Application`` object::
from cyclone import web
application = web.Application([
(r"/", MainPageHandler),
], error_handler=CustomErrorHandler)
This technique is also compatible with Bottle-style applications:
This technique is also compatible with Bottle-style applications::
from cyclone.bottle import create_app
Expand Down

0 comments on commit fe4276b

Please sign in to comment.