Updated the docs template with a Location regexp form.
authorwking <wking@loki.(none)>
Fri, 29 Aug 2008 00:09:19 +0000 (20:09 -0400)
committerwking <wking@loki.(none)>
Fri, 29 Aug 2008 00:09:19 +0000 (20:09 -0400)
Also fixed a silly typo in text_db.py.

chem_web.py
text_db.py

index 4ea9de03dc3a014ceb0672246d9f4a85e681bbe1..ba24324044d7038d43cd0ee581e74ea6bf67acdb 100755 (executable)
@@ -438,6 +438,7 @@ class templt (object) :
                        ' <head>\n'
                        ' </head>\n'
                        ' <body>\n'
+                       '  <p>\n'
                        '  <a href="/docs/inventory.pdf">Inventory</a>\n'
                        '   in accordance with the \n'
                        '   <a href="http://www.drexelsafetyandhealth.com/lab-chem.htm#chpe7">\n'
@@ -448,6 +449,19 @@ class templt (object) :
                        '   and \n'
                        '   <a href="http://www.drexelsafetyandhealth.com/lab-chem.htm#chpe10">E-10</a>\n'
                        '   .<br>\n'
+                       '  </p>\n'
+                       '  <p>\n'
+                       '  For door warnings for subsections of the whole room,\n'
+                       '   please give a location regexp in the form below.\n'
+                       '  For example: ".*liquids" or "refrigerator".\n'
+                       '  </p>\n'
+                       '  <form action="" method="post" enctype="multipart/form-data">\n'
+                       '   <table>\n'
+                       '    <tr><td>Location regexp</td><td>:</td>\n'
+                       '     <td><input type="text" size="50" id="regexp" name="regexp"></td></tr>\n'
+                       '   </table>\n'
+                       '   <input type="submit" value="Submit" />\n'
+                       '  </form>\n'
                        ' </body>\n'
                        '</html>\n')
                  file(self.dir+'docs.html', 'w').write(docs)
index bc9f20d1dd7eb72e460c5cc00d8b0566c5a751db..06d31fcc3a3407ab6c179128890c6ab35a42f456 100644 (file)
@@ -52,7 +52,7 @@ class text_db (object) :
         self._open()
         
     # directory and file IO operations
-    def check_dir(self. dir) :
+    def check_dir(self, dir) :
         "Create the database directory if it's missing"
         if os.path.isdir(dir) :
             return # all set to go