【问题标题】:How to use notify in Django with Bootstrap?如何在 Django 中通过 Bootstrap 使用通知?
【发布时间】:2014-02-11 16:10:52
【问题描述】:

尝试将这些通知系统放在我的模板上。

我用一个:

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

【问题讨论】:

    标签: django twitter-bootstrap pnotify


    【解决方案1】:

    解决方法:

    <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>
    

    【讨论】:

      猜你喜欢
      • 2018-01-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-25
      • 1970-01-01
      • 1970-01-01
      • 2019-06-10
      • 1970-01-01
      相关资源
      最近更新 更多