From d35c3cabea4181547bfdc54e06cdc348ca37af74 Mon Sep 17 00:00:00 2001 From: almelid Date: Sat, 8 May 2010 20:30:32 +0000 Subject: [PATCH] =?UTF-8?q?Laget=20en=20meny=20for=20=C3=A5=20legge=20til?= =?UTF-8?q?=20produkter.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data | Bin 9216 -> 9216 bytes text_based.py | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data b/data index ed7a37a29fc3632dad83673f887e1fbc042eab3f..a10ed8cf98e1566bd62d421452b1cd5911f90d74 100644 GIT binary patch delta 85 zcmV-b0IL6hNPtL?8v!4&9Ow@W1Ou`F1M>sp1F{3hvk?TM12GSz)Pkog1OOocOLl2% rYfN=+b7~3|g1n^aj&=k9Edf_yY;WpW;~;}aba$cP;+ delta 33 pcmZqhXz-XI%_zH3<^?|o6Z2yR=FiNJHw$uHV`gO7{8(64006bD3T6NR diff --git a/text_based.py b/text_based.py index cf0fcd3..359d2b1 100644 --- a/text_based.py +++ b/text_based.py @@ -309,7 +309,7 @@ class ProductListMenu(Menu): print line_format % (p.name, p.price, p.bar_code) self.pause() -class AddProductMenu(Menu) +class AddProductMenu(Menu): def __init__(self): Menu.__init__(self, 'Add product') @@ -322,7 +322,7 @@ class AddProductMenu(Menu) session.add(product) session.commit() session.close() - print 'Added product %s, price %d, bar code %d' (name,price,bar_code) + print 'Added product %s, price %d, bar code %d' % (name,price,bar_code) self.pause() @@ -393,7 +393,7 @@ def retrieve_product(search_str, session): #main = MainMenu() main = Menu('Dibbler main menu', - items=[BuyMenu(), ChargeMenu(), TransferMenu(), Menu('Add user'), Menu('Add product'), + items=[BuyMenu(), ChargeMenu(), TransferMenu(), Menu('Add user'), AddProductMenu(), ShowUserMenu(), ProductListMenu()], exit_msg='happy happy joy joy') main.execute()