This project has been archived by its maintainers, and is no longer receiving any updates.
Most cases of data denormalization are pretty common so `django-composition` has several "short-cuts" fields that handles most of them.
## Base concept
`CompositionField` is django model field that provides interface to data denormalization.
`CompositionField` constructor params:
- native - Django field instance for current compostion field
- trigger - one or some numberr of triggers that handle composition.
Trigger is a dict with allowed keys:
- on - signal or list of signals that this field handles
- do - signals handler, with 3 params:
- related instance
- instance (that comes with signal send)
- concrete signal (one from `on` value)
- field_holder_getter - function that gets instance(that comes with signal send)\
as parameter and returns field holder
object (related instance)
- sender - signal sender
- sender_model - model instance or model name that send signal
- commit - flag that indicates save instance after trigger appliance or not
- commons - a trigger like field with common settings
for all given triggers
- update_method - dict for customization of update_method. Allowed params:
- initial - initial value to field before applince of method
- do - index of update trigger or trigger itself
- queryset - query set or callable(with one param - `instance` of an holder model)
that have to retun something iterable
- name - custom method name instead of `update_FOO`
## Short-cuts
Here is the list of provided short-cut fields:
- `ForeignAttributeField`
- `ChildsAggregationField`
- `AtributesAggregationField`
Metadata
Release files for django-composition 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-composition-0.2.tar.gz | 7.1 kB | Without provenance | Details for django-composition-0.2.tar.gz |
Release files / django-composition-0.2.tar.gz
| Download URL | django-composition-0.2.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d25f933b942ac14fed157ed3ef47cf8b427cf51964f3e6745c3a7869cfad3af6
|
|
BLAKE2b-256 checksum How to use checksums |
9996974ccd35623cf2d96096b029413e653f18ef8307df4a3ab8655e7978eead
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-composition 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.