CompositeField for Django Models
This is an implementation of a CompositeField for Django. Composite fields can be used to group fields together and reuse their definitions.
Example
class CoordField(CompositeField):
x = models.FloatField()
y = models.FloatField()
class Place(models.Model):
name = models.CharField(max_length=10)
coord = CoordField()
p = Place(name='Foo', coord_x=42, coord_y=0)
q = Place(name='Foo', coord=p.coord)
q.coord.y = 42
How does it work?
The content of composite fields are stored inside the model, so they do
not have to fiddle with any internals of the Django models. In the example
above p.coord returns a proxy object that maps the fields x and y
to the model fields coord_x and coord_y. The proxy object also
makes it possible to assign more than one property at once.
Documentation can be found at RTFD.
Metadata
Release files for django-composite-field 2.0.1
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_composite_field-2.0.1.tar.gz | 14.1 kB | Without provenance | Details for django_composite_field-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_composite_field-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for django_composite_field-2.0.1-py3-none-any.whl |
Total release size: 30.5 kB
Release files / django_composite_field-2.0.1.tar.gz
| Download URL | django_composite_field-2.0.1.tar.gz |
|---|---|
| Size | 14.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57be0caf9fbdeca5bf055339e276231273e4720911965f2fcdaf239fa6ffe152
|
|
BLAKE2b-256 checksum How to use checksums |
ee02148add06846c2ab3c80e2f4181fb562b08bec026092f8e50a05b7593304a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-49-generic
|
Release files / django_composite_field-2.0.1-py3-none-any.whl
| Download URL | django_composite_field-2.0.1-py3-none-any.whl |
|---|---|
| Size | 16.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
46decf22590b29dfd4dcc7810657f1dbf38a845702569c3ea68ef70d7373ce28
|
|
BLAKE2b-256 checksum How to use checksums |
59b346c9ec541f30f1a27e1519e2166612c8d909434c70f6fb0ed0bf044c64a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.3 Linux/6.8.0-49-generic
|
Security for django-composite-field 2.0.1
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.