A product aggregation function to a postgres database and makes it available with django
Project description
Summary
This django library adds signals for the bulk database actions provided by django (bulk_create
, bulk_update
and QuerySet.update
)
usage
Add app to settings
INSTALLED_APPS = [
...,
bulk_signals,
...
]
Import signals and connect.The signals are connected the same way as in Django itself. To see them in action use the following snippet:
from django.dispatch import receiver
from bulk_signals import signals
@receiver(signals.pre_bulk_update, signals.post_bulk_update, signals.post_query_update)
def debug(*args, **kwargs):
print(args)
print(kwargs)
You can skip the signals on a single execution by using the skip_signal=True
keyword argument.
Which keyword should be used for skipping is configurable via the BULK_SIGNALS_SKIP_KEY="skip_signal"
configuration in the django settings.
TODO
- test against different database backends
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
File details
Details for the file django-bulk-signals-0.4.2.tar.gz
.
File metadata
- Download URL: django-bulk-signals-0.4.2.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a94a57858c4dacf479b72dbbde256e49f1316b0f41ba75c888a687e32140574d |
|
MD5 | 70e3e4f2f19174f02ca8ec7fd829544c |
|
BLAKE2b-256 | 2925e8b409953753e88b7c6bf1796fb652a6858c4dbd1ef9fdfe1652572e8d78 |
File details
Details for the file django_bulk_signals-0.4.2-py3-none-any.whl
.
File metadata
- Download URL: django_bulk_signals-0.4.2-py3-none-any.whl
- Upload date:
- Size: 8.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f8ef844b0d8714de11912160bcf03d66e5361afe560bb43c92f7aabbe733f32 |
|
MD5 | 9aec5a12dd364a7dc96f7e6f51069bc4 |
|
BLAKE2b-256 | c2ce67c633a166a769b9a0750e828de3b04457d98739cf66a5726c4c05148d48 |