Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Django Whistle is a Django app that provides a simple way to send notifications via different channels.
Currently supports web
, push
, email
channels.
pip install django-whistle
INSTALLED_APPS
in the Django project settings:# settings.py
INSTALLED_APPS = [
# ...
'whistle',
]
Customize Django Whistle by configuring settings in your project's settings.py
:
Setup events and channels for notifications like this: Pro tip, you can use TextChoices for events.
# settings.py
WHISTLE_CHANNELS = ['web', 'push', 'email']
WHISTLE_NOTIFICATION_EVENTS = (
('NAME_OF_EVENT', gettext_lazy('Object %(object)r was updated')
)
### Custom Notification Manager/Handlers
You can ovverride the logic of sending notifications by creating custom manager or handler. Handler is for general
availability of event/channel, and managers is for defining the behaviour. For example, you can use it to customize
emails, add context to emails, or for whatever you miss in the default implementation.
```python
# settings.py
WHISTLE_EMAIL_MANAGER_CLASS = "bidding.notifications.managers.CustomEmailManager"
WHISTLE_NOTIFICATION_MANAGER_CLASS = (
"bidding.notifications.managers.CustomNotificationManager"
)
WHISTLE_AVAILABILITY_HANDLER = "bidding.notifications.handlers.availability_handler"
You can send notifications asynchronously using queues.
# settings.py
WHISTLE_REDIS_QUEUE = None
WHISTLE_USE_RQ = False
RQ_QUEUES = None
WHISTLE_CACHE_TIMEOUT = None # infinite
Explain how to run the automated tests for this system
Explain what these tests test and why
Give an example
Explain what these tests test and why
Give an example
Add additional notes about how to deploy this on a live system
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
FAQs
Advanced notifications for Django
We found that django-whistle demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.