@@ -8,10 +8,12 @@ and we will try to get the keys for their PyPi repo or something... but meanwhil
...
@@ -8,10 +8,12 @@ and we will try to get the keys for their PyPi repo or something... but meanwhil
django_notify does this:
django_notify does this:
from django_notify import notify
```python
fromdjango_notifyimportnotify
EVENT_KEY = "my_key"
notify(_("OMG! Something happened"), EVENT_KEY)
EVENT_KEY="my_key"
notify(_("OMG! Something happened"),EVENT_KEY)
```
All users subscribing to `EVENT_KEY` will have a notification created in their
All users subscribing to `EVENT_KEY` will have a notification created in their
stack. If you have emails enabled, they may get a summary of notifications at an
stack. If you have emails enabled, they may get a summary of notifications at an
...
@@ -35,30 +37,32 @@ this:
...
@@ -35,30 +37,32 @@ this:
Here is a snippet example to get you started, but you need to get ui.js from [django-wiki/plugins/notifications](https://github.com/benjaoming/django-wiki/tree/master/wiki/plugins/notifications)
Here is a snippet example to get you started, but you need to get ui.js from [django-wiki/plugins/notifications](https://github.com/benjaoming/django-wiki/tree/master/wiki/plugins/notifications)
<h2>Notifications:</h2>
```html
<ul>
<h2>Notifications:</h2>
<li class="notifications-empty"><a href="#"><em>{% trans "No notifications" %}</em></a></li>
<ul>
<li class="divider"></li>
<liclass="notifications-empty"><ahref="#"><em>{% trans "No notifications" %}</em></a></li>
<li>
<liclass="divider"></li>
<a href="#" onclick="notify_mark_read()">
<li>
<i class="icon-check"></i>
<ahref="#"onclick="notify_mark_read()">
{% trans "Clear notifications list" %}
<iclass="icon-check"></i>
</a>
{% trans "Clear notifications list" %}
</li>
</a>
<!-- Example of a settings page linked directly under the notifications -->
</li>
<li>
<!-- Example of a settings page linked directly under the notifications -->