From 0ef8460158520285c89f32a03f387ef6871ce3f1 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Wed, 12 May 2010 10:49:23 +0200 Subject: Fix --- controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controller.py b/controller.py index b853f2a..617bab5 100644 --- a/controller.py +++ b/controller.py @@ -70,7 +70,7 @@ class Add: form.Textbox( "date", form.notnull, - value = datetime.date.today().strftime(dformat) + value = datetime.date.today().strftime(self.dformat) ), form.Textbox( "expense", @@ -85,7 +85,7 @@ class Add: map(op.itemgetter(0), sorted(Category.query.values(Category.name))) ), validators = map(lambda x: form.Validator(*x), ( - ("Date Format does not match", lambda f: datetime.datetime.strptime(f.date, Add.dformat)), + ("Date Format does not match", lambda f: datetime.datetime.strptime(f.date, self.dformat)), ("Not a valid decimal", lambda f: decimal.Decimal(f.expense)), )) ) -- cgit v1.2.3-70-g09d2