Revision history [back]
From Python can be done this way:
request.user.message_set.create(message=_('You did it!'))
From javascript:
notify.show(gettext('You did it')); //will hang until deleted or the page reloaded
notify.show(gettext('Yeah'), true); //in this case message will flash and fade out
The fade-out effect will be available in the future release, probably 0.7.45.
Caveats - (1) we'll have to switch to using another method of messaging, because this one will be removed from the future Django releases; (2) javascript API can change in the future.
A separate question is - which messages you'd want to show and in what circumstances...
Encouraging messages are great, but should not be shown way too often.
From Python can be done this way:
request.user.message_set.create(message=_('You did it!'))
From javascript:
notify.show(gettext('You did it')); //will hang until deleted or the page reloaded
notify.show(gettext('Yeah'), true); //in this case message will flash and fade out
The fade-out effect will be available in the future release, probably 0.7.45.
Caveats - (1) we'll have to switch to using another method of messaging, because this one will be removed from the future Django releases; (2) javascript API can change in the future.
A separate question is - which messages you'd want to show and in what circumstances...
Encouraging messages are great, but should not be shown way too often.
From Python can be done this way:
request.user.message_set.create(message=_('You did it!'))
From javascript:
notify.show(gettext('You did it')); //will // will hang until deleted or the page reloaded
notify.show(gettext('Yeah'), true); //in // in this case message will flash and fade out
Caveats - (1) we'll have to switch to using another method of messaging, because this one will be removed from the future Django releases; (2) javascript API can change in the future.
A separate question is - which messages you'd want to show and in what circumstances...
Encouraging messages are great, but should not be shown way too often.
From Python can be done this way:
request.user.message_set.create(message=_('You did it!'))
From javascript:
notify.show(gettext('You did it')); // message will hang until deleted or the page reloaded
reload
notify.show(gettext('Yeah'), true); // in this case message will flash and fade out
Caveats - (1) we'll have to switch to using another method of messaging, because this one will be removed from the future Django releases; (2) javascript API can change in the future.
A separate question is - which messages you'd want to show and in what circumstances...
Encouraging messages are great, but should not be shown way too often.
From Python can be done this way:
request.user.message_set.create(message=_('You did it!'))
From javascript:
notify.show(gettext('You did it')); // message will hang until deleted user deletes it or reloads the page reload
page
notify.show(gettext('Yeah'), true); // in this case message will flash and fade out
Caveats - (1) we'll have to switch to using another method of messaging, because this one will be removed from the future Django releases; (2) javascript API can change in the future.
A separate question is - which messages you'd want to show and in what circumstances...g
Encouraging messages are great, but should not be shown way too often.