Send Django server notifications to Growl
Project description
Django Growl Notifier
Send Django development server notifications to Growl (or compatible notification systems).
Features
- 🚀 Automatic notifications when Django server starts
- 🔥 Error notifications with stacktrace
- 🌐 Multiple Growl hosts support
- ⚙️ Easy configuration
- 🎯 Custom notifications in your code
Installation
pip install django-growl-notifier
Quick Setup
- Add to
INSTALLED_APPSinsettings.py:
INSTALLED_APPS = [
# ... your apps
'django_growl',
]
- Configure Growl hosts in
settings.py:
GROWL_HOSTS = [
'127.0.0.1:23053',
'192.168.1.100:23053',
]
GROWL_APP_NAME = 'My Django App' # Optional
GROWL_ENABLED = True # Optional, default True
- Run server with Growl notifications:
python manage.py runserver_growl
Or use regular runserver with auto-notify:
python manage.py runserver
Configuration
Available Settings
# Required: List of Growl hosts
GROWL_HOSTS = ['127.0.0.1:23053']
# Optional: Application name shown in Growl
GROWL_APP_NAME = 'Django Server'
# Optional: Enable/disable notifications
GROWL_ENABLED = True
# Optional: Enable error notifications
GROWL_NOTIFY_ERRORS = True
# Optional: Sticky notifications
GROWL_STICKY_ERRORS = True
GROWL_STICKY_SERVER = False
Usage
Automatic Notifications
Server start notifications are sent automatically when you run the server.
Error Notifications
Add middleware to settings.py:
MIDDLEWARE = [
# ... other middleware
'django_growl.middleware.GrowlErrorMiddleware',
]
Manual Notifications
from django_growl import send_notification
send_notification(
title="Task Complete",
message="Database backup finished successfully",
sticky=False
)
Requirements
- Python >= 3.8
- Django >= 3.2
- gntp >= 1.0.3
- Growl or compatible notification system
License
(MIT License)[LICENSE]
author
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_growl_notifier-1.0.1.tar.gz.
File metadata
- Download URL: django_growl_notifier-1.0.1.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4cdda1fbe29cf4c566949cd8b89f071378eb8a965c4c449e1ec7d98937d4adf4
|
|
| MD5 |
45e71fc969829b139f63c73356a76144
|
|
| BLAKE2b-256 |
6a0cf989c32f4975fdf28740edbeb0fee75f045f73e8fcd4ccc7a36108674e1d
|
File details
Details for the file django_growl_notifier-1.0.1-py3-none-any.whl.
File metadata
- Download URL: django_growl_notifier-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac60182e90c19a39e0db0933a1bb1d54664d3ae11ee23c044559658b1b5f100b
|
|
| MD5 |
4a2743e68d8482355801b3eeaa601d1f
|
|
| BLAKE2b-256 |
bcfd4542e11a93bd1bc7d0ed566137d2493efae4bcb740b6214cd4b1ef0766cf
|