diff --git a/pyfsw/__init__.py b/pyfsw/__init__.py index 09ccf5c..ef7e7df 100644 --- a/pyfsw/__init__.py +++ b/pyfsw/__init__.py @@ -49,5 +49,5 @@ def init_globals(): from pyfsw.helpers import * from pyfsw.views import news, forum, account, community, community_guilds, library, shop -from pyfsw.views import error, captcha, outfit, paypal, zaypay +from pyfsw.views import error, captcha, messages, outfit, paypal, zaypay from pyfsw.views.admin import dashboard, news, forum, community, shop diff --git a/pyfsw/static/js/custom.js b/pyfsw/static/js/custom.js new file mode 100644 index 0000000..c4d9340 --- /dev/null +++ b/pyfsw/static/js/custom.js @@ -0,0 +1,8 @@ +$(function() { + $.get('/messages', function(data) { + if(!data.length) return; + + $('#messages').show(); + $('#messages').append(data); + }); +}); diff --git a/pyfsw/templates/messages.htm b/pyfsw/templates/messages.htm new file mode 100644 index 0000000..d595fc4 --- /dev/null +++ b/pyfsw/templates/messages.htm @@ -0,0 +1,24 @@ +{% with messages = get_flashed_messages(category_filter=['error']) %} +{% if messages %} +