A Django app to handle notifications.
Project description
Django Dans Notifications
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 migrateto 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_CLASSESandDEFAULT_PAGINATION_CLASSin yoursettings.pyto 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
Docs
Model docs.
API docs.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-dans-notifications-1.1.0.tar.gz.
File metadata
- Download URL: django-dans-notifications-1.1.0.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27300928b70f72b60bca12c7bc7f3b54bdad6e5ff4ee784f1584ee8dbb89b2df
|
|
| MD5 |
77a2108cf8354eff44874ced1cdb8de3
|
|
| BLAKE2b-256 |
4ec19297abfdff337934bf007df06eceb226a8b6e2a8265ce8c974d908c0c5e7
|
File details
Details for the file django_dans_notifications-1.1.0-py3-none-any.whl.
File metadata
- Download URL: django_dans_notifications-1.1.0-py3-none-any.whl
- Upload date:
- Size: 32.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f02774c5cfe5ebb247bc18be7973600459a1afed51a4d819569455342f64dd1e
|
|
| MD5 |
7d63e02d8ddf3a9710ace072bf405c54
|
|
| BLAKE2b-256 |
c830869ef12d3a759cec50660286b88acd6fe2b2827acb7b1dcf0ddf32d060c4
|