django-messages-to-bootstrap-notify is a django reusable application to show django messages using bootstrap-notify
Enable and configure Django Messages Framework.
Add "dm2bn" to settings.INSTALLED_APPS.
INSTALLED_APPS += ( "dm2bn", )
Load "dm2bn_tags" to your base template, load vendor static by including dm2bn/includes/dm2bn_static.html template, place bootstrap-notify settings in template by calling {% dm2bn_settings %} and call showMessages function.
For example:
{% load dm2bn_tags %} {% include "dm2bn/includes/dm2bn_static.html" %} {% dm2bn_settings %} <script type="text/javascript"> $(function () { // show messages $.showMessages({{ messages|messages2json }}); }); </script>
If you already use some part of vendor static, manual add missing requirements to you template.
Requirements:
For pretty looking error messages add "danger" to extra_tags in messages.error calls.
For example:
messages.error(request, "Something happened wrong :(", "danger")
{ "allow_dismiss": True, "placement": { "from": "top", "align": "right", }, "delay": 3, "mouse_over": "pause", }
django-messages-to-bootstrap-notify uses the MIT license. Please check the MIT-LICENSE file for more details.
django-messages-to-bootstrap-notify includes several third party libraries which come under their respective licenses. See their licensing information in the dm2bn/static/dm2rbn/vendor/ directory.
Project Website: https://github.com/DCOD-OpenSource/django-messages-to-bootstrap-notify/
Author: Alexei Andrushievich <vint21h@vint21h.pp.ua>
For other authors list see AUTHORS file.