--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/handler.py Sun Feb 08 03:17:07 2009 +0200
@@ -0,0 +1,24 @@
+"""
+ The actual application behaviour, i.e. generating a Response from a Request :)
+"""
+
+class RequestHandler (object) :
+ """
+ A handler handles a Request, returning a Response
+ """
+
+ def __init__ (self, func, *args, **kwargs) :
+ self.func = func
+ self.args = args
+ self.kwargs = kwargs
+
+ def handle_request (self, request) :
+ """
+ Handle the request, returning a Response object
+
+ XXX: rename to __call__ kplzthx
+ """
+
+ return self.func(request, *self.args, **self.kwargs)
+
+