]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Added note regarding regex group capture to StaticFileHandler docs. 783/head
authorgwk <george.w.king@gmail.com>
Fri, 10 May 2013 21:32:28 +0000 (17:32 -0400)
committergwk <george.w.king@gmail.com>
Fri, 10 May 2013 21:32:28 +0000 (17:32 -0400)
tornado/web.py

index f1f83b85aa01a42b3305aaca31bff00c2d963b3e..6d1148d0ec1dcfe16a206207e7eddd7349776c06 100644 (file)
@@ -1633,8 +1633,12 @@ class StaticFileHandler(RequestHandler):
             (r"/static/(.*)", web.StaticFileHandler, {"path": "/var/www"}),
         ])
 
-    The local root directory of the content should be passed as the ``path``
-    argument to the handler.
+    The handler constructor requires a ``path`` argument, which specifies the
+    local root directory of the content to be served.
+
+    Note that a capture group in the regex is required to parse the value for
+    the ``path`` argument to the get() method (different than the constructor 
+    argument above); see `URLSpec` for details.
 
     To support aggressive browser caching, if the argument ``v`` is given
     with the path, we set an infinite HTTP expiration header. So, if you