[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [bridgedb/master] Add docstrings to HTTPServer.WebRoot class and render_GET() method.



commit 0f2f138f16e98110ee723cf9845b49dc52345482
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date:   Fri Jan 24 03:37:45 2014 +0000

    Add docstrings to HTTPServer.WebRoot class and render_GET() method.
---
 lib/bridgedb/HTTPServer.py |   12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/bridgedb/HTTPServer.py b/lib/bridgedb/HTTPServer.py
index be5bc44..153918b 100644
--- a/lib/bridgedb/HTTPServer.py
+++ b/lib/bridgedb/HTTPServer.py
@@ -292,11 +292,23 @@ class WebResource(twisted.web.resource.Resource):
                                                               rtl=rtl)
 
 class WebRoot(twisted.web.resource.Resource):
+    """The parent resource of all other documents hosted by the webserver."""
+
     isLeaf = True
+
     def render_GET(self, request):
+        """Handles requests for the webserver root document.
+
+        For example, this function handles requests for
+        https://bridges.torproject.org/.
+
+        :type request: :api:`twisted.web.server.Request`
+        :param request: An incoming request.
+        """
         rtl = usingRTLLang(request)
         return lookup.get_template('index.html').render(rtl=rtl)
 
+
 def addWebServer(cfg, dist, sched):
     """Set up a web server.
          cfg -- a configuration object from Main.  We use these options:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits