Solve the problem of djongo adapting to django orm
- Adaptation issue of decimal128 in mongo and decimalfield in django orm
from djongo_orm.fields import Decimal128Field
class TestModel(models.Model):
decimal_field = Decimal128Field(max_digits=10, decimal_places=2)
- Query issue of boolean in mongo and django orm, and filter issue in rest framework
Model.py
from djongo_orm.fields import BooleanField
class TestModel(models.Model):
boolean_field = BooleanField()
filter.py
from djongo_orm.fields import BooleanField
from django_filters import filters, filterset
class TestFilter1(filterset.FilterSet):
boolean_field = filters.CharFilter(method='filter_boolean_field')
def filter_boolean_field(self, queryset, name, value):
queryset = queryset.filter(boolean_field=value)
return queryset
class Meta:
model = TestModel
fields = ['boolean_field']
class TestFilter2(filterset.FilterSet):
class Meta:
model = TestModel
fields = ['__all__']
filter_overrides = {
BooleanField: {
'filter_class': filters.CharFilter,
'extra': lambda f: {},
},
}
Metadata
Release files for djongo-orm 1.0.4
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 |
|---|---|---|---|---|
| djongo_orm-1.0.4.tar.gz | 3.4 kB | Without provenance | Details for djongo_orm-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| djongo_orm-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for djongo_orm-1.0.4-py3-none-any.whl |
Total release size: 7.2 kB
Release files / djongo_orm-1.0.4.tar.gz
| Download URL | djongo_orm-1.0.4.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bfde90d912b07667539e7e7114c9d35bcf1077d47852e7d39693de52338641fc
|
|
BLAKE2b-256 checksum How to use checksums |
fb42fd012879a4536e3200aa023058a84204a882a33813ddfe4726682bc52b7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.4
|
Release files / djongo_orm-1.0.4-py3-none-any.whl
| Download URL | djongo_orm-1.0.4-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
055cb4d8408a2a3632cce7ed4d38d9ebfbcd007188ab772ba630fdf22f024f0f
|
|
BLAKE2b-256 checksum How to use checksums |
e2f395da2693fe43e5a40ce98adcd56cf0927dde3d2896117718c685c677d6d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.4
|
Security for djongo-orm 1.0.4
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.