A Django app to handle notifications.
Project description
Django Dans Notifications
GitHub
PyPi
Description
A Django app to handle notifications.
Support for basic notifications, push notifications and email notifications.
Quick start
- Add "django_dans_notifications" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
...
'django_dans_notifications',
]
- Include the notifications URLconf in your project urls.py like this:
path("notifications/", include("notifications.urls")),
-
Run
python manage.py migrate
to create the models. -
Create notifications via the API endpoints, in code or your Admin portal.
Requirements
- Python 3.0 or higher
- Django 3.0 or higher
- Django Rest Framework
- NOTE: not only must you have this installed, you must have set
DEFAULT_AUTHENTICATION_CLASSES
andDEFAULT_PAGINATION_CLASS
in yoursettings.py
to work with the APIs properly. An example config would be:
- NOTE: not only must you have this installed, you must have set
REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.PageNumberPagination",
"PAGE_SIZE": 20,
"DEFAULT_AUTHENTICATION_CLASSES": (
"rest_framework.authentication.TokenAuthentication",
),
}
Available Settings
IN_TEST
- Whether running in tests or not. Used to determine whether to actually send email.
Usage
The main way to interact with this app is to create and use the appropriate models and their managers' methods as needed.
Also included is the NotificationManager
a class to expose some common functionality and maintain object permissions.
Some available methods currently are:
- get_notifications_push/email/basic/all
- Enforce object ownership and notification 'direction'
- mark_notification_basic_read
Models
See Model docs.
APIs
See API docs.
Email Templates
See Email Template docs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-dans-notifications-1.0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d299f7f2a095ba3f53e18092db8ec0dc2108efa65ae183bf6d80c2dd41e051a |
|
MD5 | e20a5073a95111426e6053ab2c3fdb9f |
|
BLAKE2b-256 | fe21f3324a92a33d0174112fbb4a73175c43cf936dd5a702417d86aaf28b2e5b |
Close
Hashes for django_dans_notifications-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 362b83bfec223aafc24feceb3ab27d772e8caaad846b0b861dcc30d8a3b84fd7 |
|
MD5 | 0f87685248ff6ec05e123aa7bdb69366 |
|
BLAKE2b-256 | 244de24f56e6224a86101da6747a63976281ba10854d31a1893ae8d0583784be |