Exemple #1
0
    def recv_add_inventory_item(self, environ, start_response):
        formdata = environ["QUERY_STRING"]
        results = urlparse.parse_qs(formdata)

        # add the form entries to the database
        try:
            drinkz.db.add_to_inventory("".join(results["mfg"]), "".join(results["liq"]), "".join(results["amt"]))
        except drinkz.db.LiquorMissing:
            pass

        start_response("200 OK", list(html_headers))
        return page_builder.build_inventory()
Exemple #2
0
 def inventory(self, environ, start_response):
     start_response("200 OK", list(html_headers))
     return page_builder.build_inventory()