summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--controller.py4
1 files 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)),
))
)