Registry / web-framework / django-notifications-hq

django-notifications-hq

JSON →
library1.8.3pypypi✓ verified 87d ago

A GitHub-like notifications app for Django. Current version 1.8.3. Supports Django 3.2, 4.1+. Released infrequently, maintenance mode.

pip install django-notifications-hq
INSTALL
IMPORT
SIG · DJANGO-NOTIFICATIO
D
django-notifications-hq
web-frameworkpythonv1.8.3
Install
4.8s avg
Import
210ms
Disk
70MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.8.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.222s · 71.5MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 4.8s · import 0.198s · 72MB
70MB installed
● package 70MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

notify
✓ from notifications.signals import notify
✗ from notifications import notify
notify is in signals module, not top-level.
Notification
✓ from notifications.models import Notification
Straightforward import.

Basic setup and usage.

INSTALLED_APPS = [ 'notifications', # ... ] from django.conf import settings from notifications.signals import notify # Create a notification notify.send(request.user, recipient=other_user, verb='reached level 10') # In template {% load notifications_tags %} <script src="{% static 'notifications/notify.js' %}" type="text/javascript"></script> {% register_notify_callbacks callbacks='fill_notification_badge,fill_notification_list' %} {% live_notify_badge %} {% live_notify_list %}
Debug
Known issues
breakingVersion 1.5.0 introduced a required DJANGO_NOTIFICATION_CONFIG dict in settings.py. Old configs broken.
fix
Add DJANGO_NOTIFICATION_CONFIG = {'PAGINATE_BY': 20, 'USE_JSONFIELD': False, 'SOFT_DELETE': False, 'NUM_TO_FETCH': 10} to settings.py.
affects: >=1.5.0
deprecatedDjango <3.2 and Python <3.7 support dropped in 1.8.0.
fix
Upgrade to Django 3.2+ and Python 3.7+.
affects: >=1.8.0
gotchaThe notify.js callback uses class-based selectors since version 1.4.0. Old ID-based selectors break if you override templates.
fix
Use CSS classes instead of IDs in custom templates.
affects: >=1.4.0
Errors
Common errors & fixes
ImportError: cannot import name 'notify' from 'notifications'
Incorrect import path; notify is in signals module.
fix
Use: from notifications.signals import notify
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: notifications
Another app named 'notifications' is installed (e.g., django-allauth's notification).
fix
Rename your app or use a different INSTALLED_APPS label, or set NOTIFICATIONS_LABEL in settings.
Upgrade
Version history
1.8.3latest on PyPI · released Oct 19, 2023
Audit
Dependencies
DjangorequiredCore requirement
django-model-utilsrequiredUsed for model mixins
pytzrequiredTime zone support
jsonfieldoptionalOptional JSON field support when USE_JSONFIELD=True
Agent activity
33 hits · last 30 days
node
28
OpenAI (training)
2
Resources
django-notifications-hq — pip install django-notifications-hq · libregistry