コード例 #1
0
ファイル: app.py プロジェクト: Ryalian/cse491-drinkz
    def liquor_type(self, environ, start_response):
	data = direction
	liquors = "<ol>" 
	for mfg, liquor, typ in db._bottle_types_db:
		liquors += "<li>" + mfg + "  " + "</li>"
	data = data + liquors +"</o>"
        data = css_html.cssgen('yellow','30','Liquor Type') + data + css_html.htmlgen()
	start_response('200 OK', list(html_headers))
	return [data]
コード例 #2
0
ファイル: app.py プロジェクト: Ryalian/cse491-drinkz
    def inventory(self, environ, start_response):
	data = direction
	inventory = "<ol>"
	for liquor in db.get_liquor_inventory():
		mfg = liquor[0]
		l   = liquor[1]
		amount = db.get_liquor_amount(mfg,l)
		inventory += "<li>" + mfg + ", " + l + ": " + str(amount) + "ml </li>\n"
	data = data + inventory + "</ol>"
        data = css_html.cssgen('blue','30','Inventory') + data + css_html.htmlgen()
	start_response('200 OK', list(html_headers))
	return [data]
コード例 #3
0
ファイル: app.py プロジェクト: Ryalian/cse491-drinkz
    def recipe(self,environ, start_response):
	data = direction
	lack = db.get_all_recipes()
	recipes = "<ol>"
	for r in lack:
		if(db.need_ingredients(r) ==[]):
			lacks = "Yes"
		else:
			lacks = "No"
		
		recipes += "<li>" + r.name +": " + lacks+"</li>\n"
	data = css_html.cssgen('green','30','Recipe')+data + recipes + css_html.htmlgen()
	start_response('200 OK', list(html_headers))
	return [data]	
コード例 #4
0
ファイル: app.py プロジェクト: Ryalian/cse491-drinkz
    def index(self, environ, start_response):
        data = direction
        start_response('200 OK', list(html_headers))
	data = css_html.cssgen('red','30','Index') + data + css_html.htmlgen()
        return [data]
コード例 #5
0
ファイル: app.py プロジェクト: Ryalian/cse491-drinkz
    def convert(self, environ, start_response):
	data = convert()
        data = css_html.cssgen('pink','30','Convertion') + data + css_html.htmlgen()
	start_response('200 k', list(html_headers))
	data +="<p><a href='index'>Index</a>"
	return [data]