bodhi/config/app.cfg | 3 +++ bodhi/controllers.py | 4 ++++ 2 files changed, 7 insertions(+)
New commits: commit 7b243fb7612e1a6aa7a8015c9038f80c2b50f6df Author: Luke Macken lmacken@redhat.com Date: Mon Jul 12 16:08:45 2010 -0400
Add the ability to flash messages on the front page using our config file
diff --git a/bodhi/config/app.cfg b/bodhi/config/app.cfg index 87e4c6f..b67bbb0 100644 --- a/bodhi/config/app.cfg +++ b/bodhi/config/app.cfg @@ -10,6 +10,9 @@
[global]
+# A notice to flash on the front page +frontpage_notice = '' + ## ## Mash settings ## diff --git a/bodhi/controllers.py b/bodhi/controllers.py index 0627ebf..d26ffc6 100644 --- a/bodhi/controllers.py +++ b/bodhi/controllers.py @@ -88,6 +88,10 @@ class Root(controllers.RootController): RESULTS, FIELDS, GRID = range(3) updates = None
+ notice = config.get('frontpage_notice') + if notice: + flash(notice) + # { 'Title' : [SelectResults, [(row, row_callback),]], ... } grids = { 'comments' : [