summaryrefslogtreecommitdiff
path: root/controller.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--controller.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/controller.py b/controller.py
index 55baa09..824c638 100644
--- a/controller.py
+++ b/controller.py
@@ -309,7 +309,15 @@ class ConstEdit (ConstAdd):
def POST(self, id):
exp = ConstExpense.get(id)
self.get_expense = lambda *x: exp
- return ConstAdd.POST(self)
+
+ if "changeB" in web.input():
+ return ConstAdd.POST(self)
+ elif "deleteB" in web.input():
+ web.ctx.orm.delete(exp)
+ raise web.seeother("/const")
+ else:
+ return self.GET(id)
+
class Cat:
def GET(self):
eumann2-2/+2 2020-07-24Revert "Remove translation hack"René 'Necoro' Neumann1-1/+7 This reverts commit 6600ae0674bc685c4756a040b4db47e927f2e15e. 2020-07-24length validators for string fieldsRené 'Necoro' Neumann4-3/+9 2020-07-24Fix handling of prefilling the description field on adding a new expense.René 'Necoro' Neumann1-9/+6 2020-07-24Remove translation hackRené 'Necoro' Neumann1-7/+1 2020-07-24Improved debuggingRené 'Necoro' Neumann2-1/+2 2020-07-23RestructureRené 'Necoro' Neumann51-2/+3 2020-07-22Do not write bytecode for local debug runningRené 'Necoro' Neumann1-1/+4 2020-07-22Remove left over mention of jquery-uiRené 'Necoro' Neumann1-6/+1 2020-07-22Add simplejson as a dependencyRené 'Necoro' Neumann1-0/+1 2020-07-22Settings splittingRené 'Necoro' Neumann2-5/+3 2020-07-22Add flipflopRené 'Necoro' Neumann1-0/+1