doc(quickstart): Update examples to use new-style classes

Closes #565
This commit is contained in:
Adam Yala
2015-07-22 16:57:14 -05:00
parent e4543098a3
commit c6388fc9fe

View File

@@ -28,7 +28,7 @@ started writing an API:
# Falcon follows the REST architectural style, meaning (among
# other things) that you think in terms of resources and state
# transitions, which map to HTTP verbs.
class ThingsResource:
class ThingsResource(object):
def on_get(self, req, resp):
"""Handles GET requests"""
resp.status = falcon.HTTP_200 # This is the default status
@@ -207,7 +207,7 @@ parameters, handling errors, and working with request and response bodies.
return hook
class ThingsResource:
class ThingsResource(object):
def __init__(self, db):
self.db = db