Question

Trying to put those notification system on my templates.

I use a:

{% for message in messages %}
    <<What I need to put here to create a notifiy for each error message??>>
{% endfor %}
Was it helpful?

Solution

Solved with:

<script>
{% for message in messages %}
$(document).ready(function() {
    $.pnotify({
        title: '{{ message.tags|upper }}',
        text: '{{ message }}.',
        type: '{{ message.tags }}',
        hide: false,
        styling: 'bootstrap',
        closer_hover: false,
        sticker_hover: false
    });
});
{% endfor %}
</script>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top