A Django app to sends notifications to internal users.
Project description
DRF Notification System
An app that sends notifications to internal users.
Requirements
- Django (2.2 <= 3.2 )
- Django REST framework
- django_filters
- Celery
Installation
pip install drf-notification-system
Post-Install Setup
Django Settings
INSTALLED_APPS = [
...
'notification_system',
]
Include the notification system urls in your project urls.py like this
path('notification-system/', include('notification_system.urls')),
-
Run
python manage.py migrate
to create the notification system models. -
If you want to change send email notification default queue name, set
EMAIL_NOTIFICATION_QUEUE_NAME
constance on thesettings.py
file. the default value is 'send_email_notification' -
If you want to change send update outgoing message status default queue name, set
UPDATE_OUTGOING_MESSAGE_STATUS_QUEUE_NAME
constance on thesettings.py
file. the default value is 'update_outgoing_message_status' -
If you want to change send email notification rate limit, set
NOTIFICATION_SYSTEM_SEND_EMAIL_RATE_LIMIT
constance on thesettings.py
file. the default value is '700/m' -
If you want to change user fields to pass template as context data, set
NOTIFICATION_SYSTEM_DEFAULT_USER_FIELD
constance on thesettings.py
file. the default value is ['id', 'username', 'first_name', 'last_name', 'email'] -
Run Celery worker with the following command
celery -A 'project_name' worker --loglevel DEBUG -Q 'queue_name' --concurrency=1
celery -A 'project_name' worker --loglevel DEBUG -Q send_email_notification --concurrency=1
celery -A 'project_name' worker --loglevel DEBUG -Q update_outgoing_message_status --concurrency=1
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
Hashes for drf-notification-system-1.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee16eb02ea3bda0a81300245acbb16627d8ecf4ca5c71f142d1dcec0870d0b70 |
|
MD5 | 20816dbcb44150e6718b20a6aa939d90 |
|
BLAKE2b-256 | 2170c33415bc8835ea6e774e18fc3d157ae6cf78a8c56d67e7d8f886e73c9a99 |
Hashes for drf_notification_system-1.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fedc3ca4d53d22c27a29e53030db1c924734874a2b4b057f1adc7fa1275f3385 |
|
MD5 | 8ea2c713abb9ad9c0ad683d9a343a419 |
|
BLAKE2b-256 | 896ef7899e1540225bb0ece8b9c8fb34f64c348a085faa70e2c03f53d92e9c0c |