From: Fredrik Tolf Date: Thu, 1 Feb 2018 03:50:54 +0000 (+0100) Subject: Allow funplex to handle requests to root. X-Git-Url: http://dolda2000.com/gitweb/?p=wrw.git;a=commitdiff_plain;h=6a9037cbbdde6ac644683096f8b0b0e53a678b3e Allow funplex to handle requests to root. --- diff --git a/wrw/util.py b/wrw/util.py index a1dcc6c..7209ae4 100644 --- a/wrw/util.py +++ b/wrw/util.py @@ -41,6 +41,8 @@ class funplex(object): def __call__(self, req): if req.pathinfo == "": + if "__root__" in self.dir: + return self.dir["__root__"](req) raise resp.redirect(req.uriname + "/") if req.pathinfo[:1] != "/": raise resp.notfound()