# HG changeset patch # User Jeff Hammel # Date 1350431369 25200 # Node ID f517d80bafe0501b6206a6167132b6b35766cc9a # Parent ebb65758d725d5866be1c14586bf4749b561c14d more stubbing diff -r ebb65758d725 -r f517d80bafe0 dogdish/dispatcher.py --- a/dogdish/dispatcher.py Tue Oct 16 16:34:22 2012 -0700 +++ b/dogdish/dispatcher.py Tue Oct 16 16:49:29 2012 -0700 @@ -14,6 +14,7 @@ here = os.path.dirname(os.path.abspath(__file__)) class Handler(object): + """abstract handler object for a request""" def __init__(self, request): self.request = request @@ -34,14 +35,18 @@ raise exc.HTTPSeeOther(location=location) class Get(Handler): + """handle GET requests""" + # template for response body body = """ - + """ + ### methods for request handler + @classmethod def match(cls, request): return request.method == 'GET' @@ -63,6 +68,8 @@ body=body % query) class Dispatcher(object): + """web application""" + ### class level variables defaults = {'directory': here}