summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2013-10-19 11:34:52 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2013-10-19 11:34:52 +0200
commitc9112dce1074669041fcc3d950101119b9d18569 (patch)
tree9e862b30073fec266bbfcbed77af92dc5124d008
parenta8fc044a8dff829c5b55bcb32cb5a7525b5bc746 (diff)
downloadkosten-c9112dce1074669041fcc3d950101119b9d18569.tar.gz
kosten-c9112dce1074669041fcc3d950101119b9d18569.tar.bz2
kosten-c9112dce1074669041fcc3d950101119b9d18569.zip
More informational flashes
-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 }