djangosignalcontrol 0.1.2
django-signalcontrol
Django signalcontrol is a django extension for dynamically enabling/disabling signals. This application allows django signals to be disabled or enabled on-demand through the django admin interface.
Code Quality
Workflow
Description
Status
Bandit
security checks
Black
code formatting
CodeQL
security analysis
Coveralls
code coverage status
Isort
python import ordering
Mypy
static type checking
Pytest
unit testing
Radon
code complexity analysis
Ruff
static code analysis
Safety
dependency scanner
Code Coverage Dashboard:
https://coveralls.io/github/djangoaddicts/django-signalcontrol
Documentation
Full documentation can be found on http://django-signalcontrol.readthedocs.org.
Documentation source files are available in the docs folder.
License
django-signalcontrol is licensed under the GNU-3 license (see the LICENSE file for details).
https://github.com/djangoaddicts/django-signalcontrol/blob/docs/LICENSE
Installation
install via pip:
pip install django-signalcontrol
add the following to your INSTALLED_APPS in settings.py:
djangoaddicts.signalcontrol
Features
Signal Decorator
SignalControl can be added to a signal with the provided decorator. In the signals.py file, import the signalcontrol
decorator and add the signal_control decorator to the line directly above the signal definition.
Admin Interface
An django admin interface for django-signalcontrol is available to set signals to enabled or disabled. This displays
all signals that can be controlled, and lists the application, model, signal receiver and signal name.
Additionally, full search is available and filters are available for each field.
Signals can be enabled or disabled individually or in bulk.
Usage Example
from signalcontrol.decorators import signal_control
@receiver(post_save, sender=MyCoolModel)
@signal_control
def msg_after_my_model_save(sender, instance, created, **kwargs):
""" some signal """
print('you just saved an instance of MyCoolModel')
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.