You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by ke...@apache.org on 2019/06/27 18:29:54 UTC

[allura] 01/01: [#8312] Fixes regression in flash message display, due to recent TG upgrade

This is an automated email from the ASF dual-hosted git repository.

kentontaylor pushed a commit to branch kt/8312
in repository https://gitbox.apache.org/repos/asf/allura.git

commit e1a244adf336d368ab2081bcdc3c556f3553e0c9
Author: Kenton Taylor <kt...@slashdotmedia.com>
AuthorDate: Thu Jun 27 18:29:26 2019 +0000

    [#8312] Fixes regression in flash message display, due to recent TG upgrade
---
 Allura/allura/controllers/root.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Allura/allura/controllers/root.py b/Allura/allura/controllers/root.py
index c4e1bd4..be3d5bb 100644
--- a/Allura/allura/controllers/root.py
+++ b/Allura/allura/controllers/root.py
@@ -19,10 +19,10 @@
 
 """Main Controller"""
 import logging
+from string import Template
 
-from tg import expose, request, config, session, redirect
+from tg import expose, request, config, session, redirect, flash
 from tg.decorators import with_trailing_slash
-from tg.flash import TGFlash
 from tg import tmpl_context as c
 from tg import response
 from paste.deploy.converters import asbool
@@ -47,7 +47,7 @@ __all__ = ['RootController']
 
 log = logging.getLogger(__name__)
 
-TGFlash.static_template = '''$('#messages').notify('%(message)s', {status: '%(status)s'});'''
+flash.static_template = Template("$$('#messages').notify('$message', {status: '$status'});")
 
 
 class W: