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 "notifications" to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [
...
'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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7256c816f5e1f2ba841e78f0c7b6e4da87309d3e535f0390dd3585b485d4cfc4 |
|
MD5 | 4e0a33d083b3b0a4254393fe1ae3dec2 |
|
BLAKE2b-256 | e8285440d4426492a24c47f162dedc52114c60ca944efd49bd86fa7ba8ed220a |
Close
Hashes for django_dans_notifications-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66fb4b0062410e0d6f812debf42bfb0f10fa98aa68700174277f3991313258f3 |
|
MD5 | 9c2720d8e7b56f3ecb98cf3165d626ae |
|
BLAKE2b-256 | 1a15a712c5e17a58ec1dcdd77d30ab38d56bd9c273ea152610a044e250f47980 |