Skip to main content
File added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

django-nyt
==========

django\_nyt does this:

.. code:: python

from django_nyt import notify

EVENT_KEY = "my_key"
notify(_("OMG! Something happened"), EVENT_KEY)

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 interval of their choice.

Data can be accessed easily from Django models or from the included JSON
views.

Why should you do this?
-----------------------

Users need an cleverly sifted stream of events. Ensure that they have
the possibility of customizing what they deem fit for their stream.

What do you need to do?
-----------------------

You need to do a lot. Firstly, you need to write some javascript that
will fetch the latest notifications and display them in some area of the
screen. Upon clicking that icon, the latest notifications are displayed.
Something like this:

.. figure:: ./docs/misc/screenshot_dropdown.png
:alt: Javascript drop-down

Javascript drop-down
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/static/wiki/plugins/notifications/js>`__
which is a couple of utility functions that use JQuery to get
notifications from a JSON view and display them in the right DOM
element.

.. code:: html

<h2>Notifications:</h2>
<ul>
<li class="notifications-empty"><a href="#"><em>{% trans "No notifications" %}</em></a></li>
<li class="divider"></li>
<li>
<a href="#" onclick="notify_mark_read()">
<i class="icon-check"></i>
{% trans "Clear notifications list" %}
</a>
</li>
<!-- Example of a settings page linked directly under the notifications -->
<li>
<a href="{% url 'wiki:notification_settings' %}">
<i class="icon-wrench"></i>
{% trans "Notification settings" %}
</a>
</li>
</ul>
<script type="text/javascript">
URL_NOTIFY_GET_NEW = "{% url "notify:json_get" %}";
URL_NOTIFY_MARK_READ = "{% url "notify:json_mark_read_base" %}";
URL_NOTIFY_GOTO = "{% url "notify:goto_base" %}";
</script>
<script type="text/javascript" src="{{ STATIC_URL }}wiki/plugins/notifications/js/ui.js"></script>

Docs
----

Here:

http://django-nyt.readthedocs.org/en/latest/

Community
---------

Please visit #django-wiki on irc.freenode.net as many django-wiki users
are also familiar with django-nyt which previously lived inside
django-wiki.

*This is a work in progress*
----------------------------

TODO:

- Missing email functionality
- Functions to easily retrive notifications and mark them as read
- Some easy-to-use template tags and templates to override.
- Examples of how to extend

Release files for django-nyt 0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for django-nyt 0.9
File Size Uploaded
django-nyt-0.9.tar.gz 39.0 kB Details

Release files / django-nyt-0.9.tar.gz

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL django-nyt-0.9.tar.gz
Size 39.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8b0e1ec1a222c099559e552f3df1ff5b43e9aa45fadcc7c01766c6b3975c1c15
BLAKE2b-256 checksum
How to use checksums
7bace0092be731153cd9d34d283455cc9ff904fac031c40f428695020b9f3d50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.6.0

2 release files

1.5.0

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4

2 release files

1.3

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1

2 release files

1.0

2 release files

0.9.9

2 release files

0.9.8

1 release file

0.9.7.1

0.9.7

1 release file

0.9.6

0.9.5

1 release file

0.9.4

1 release file

0.9.3

1 release file

0.9.2

1 release file

0.9.1

1 release file

This release

0.9 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page