summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/views/consts.py5
-rw-r--r--app/views/expenses.py6
2 files changed, 9 insertions, 2 deletions
diff --git a/app/views/consts.py b/app/views/consts.py
index cb50704..df18188 100644
--- a/app/views/consts.py
+++ b/app/views/consts.py
@@ -1,4 +1,5 @@
-from . import Blueprint, db, \
+# -*- coding: utf-8 -*-
+from . import Blueprint, flash, db, \
current_user, login_required, \
assert_authorisation, templated, redirect, request
@@ -78,6 +79,7 @@ def edit(id):
elif form.flash_validate(): # change
form.populate_obj(exp)
db.session.commit()
+ flash(u"Eintrag geändert.")
return redirect('.show', id = id)
return { 'form': form }
@@ -115,6 +117,7 @@ def add ():
exp.user = current_user
db.session.add(exp)
db.session.commit()
+ flash(u"Eintrag hinzugefügt.")
return redirect('.show', id = exp.id)
return { 'form': form }
diff --git a/app/views/expenses.py b/app/views/expenses.py
index 181493e..90822e3 100644
--- a/app/views/expenses.py
+++ b/app/views/expenses.py
@@ -1,4 +1,5 @@
-from . import Blueprint, db, \
+# -*- coding: utf-8 -*-
+from . import Blueprint, flash, db, \
current_user, login_required, \
assert_authorisation, templated, redirect, request
@@ -101,6 +102,7 @@ def edit(id):
return { 'form': form }
db.session.commit()
+ flash(u"Eintrag '%s' (# %d) geändert." % (exp.description, exp.id))
return redirect('index')
return { 'form': form }
@@ -120,6 +122,8 @@ def add():
db.session.add(exp)
db.session.commit()
+ flash(u"Neuer Eintrag '%s' (# %d) hinzugefügt." % (exp.description, exp.id))
+
return redirect('.add')
return { 'form': form }