[Checkins] SVN: bobo/trunk/bobo Sort the the boboserver static directory listings and indent the

Jim Fulton jim at zope.com
Thu Apr 29 07:01:09 EDT 2010


Log message for revision 111572:
  Sort the the boboserver static directory listings and indent the
  generated html a little nicer.
  

Changed:
  U   bobo/trunk/bobo/src/boboserver.py
  U   bobo/trunk/bobodoctestumentation/src/bobodoctestumentation/boboserver.test

-=-
Modified: bobo/trunk/bobo/src/boboserver.py
===================================================================
--- bobo/trunk/bobo/src/boboserver.py	2010-04-29 10:41:52 UTC (rev 111571)
+++ bobo/trunk/bobo/src/boboserver.py	2010-04-29 11:01:09 UTC (rev 111572)
@@ -59,7 +59,7 @@
     @bobo.query('/')
     def index(self):
         links = []
-        for name in os.listdir(self.path):
+        for name in sorted(os.listdir(self.path)):
             if os.path.isdir(os.path.join(self.path, name)):
                 name += '/'
             links.append('<a href="%s">%s</a>' % (name, name))
@@ -69,7 +69,7 @@
           %s
         </body>
         </html>
-        """ % (self.path[len(self.root):], '<br>\n  '.join(links))
+        """ % (self.path[len(self.root):], '<br>\n          '.join(links))
 
     @bobo.subroute('/:name')
     def traverse(self, request, name):

Modified: bobo/trunk/bobodoctestumentation/src/bobodoctestumentation/boboserver.test
===================================================================
--- bobo/trunk/bobodoctestumentation/src/bobodoctestumentation/boboserver.test	2010-04-29 10:41:52 UTC (rev 111571)
+++ bobo/trunk/bobodoctestumentation/src/bobodoctestumentation/boboserver.test	2010-04-29 11:01:09 UTC (rev 111572)
@@ -199,8 +199,8 @@
     <html>
             <head><title></title></head>
             <body>
-              <a href="subdir/">subdir/</a><br>
-      <a href="doc1.txt">doc1.txt</a>
+              <a href="doc1.txt">doc1.txt</a><br>
+              <a href="subdir/">subdir/</a>
             </body>
             </html>
     <BLANKLINE>



More information about the checkins mailing list