Skip to main content

django-expression-fields lets your users type a mathematical expression in a form field. Python does the math and stores the result in the database. For example, suppose you have a model to track Things, like this:

class Thing(models.Model):
    cost = models.DecimalField(
            max_digits=5, decimal_places=2, null=True, blank=True)

Suppose Things come in packs of 12 for $7.99. Your users have to do some math to fill in the cost of a single Thing, $0.67.

But not with an expression field! Create your form like this:

class ThingForm(forms.Form):
        cost = DecimalExpressionField(
                max_digits=5, decimal_places=2, required=False)

Now your user can simply type 7.99/12 in the field and Python will do the math for them!

Metadata

Release files for django-expression-fields 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-expression-fields 0.4.0
File Size Uploaded Provenance Actions
django-expression-fields-0.4.0.tar.gz 4.5 kB Without provenance Details for django-expression-fields-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-expression-fields 0.4.0
File Interpreter ABI Platform Actions
django_expression_fields-0.4.0-py3-none-any.whl Python 3 none any Details for django_expression_fields-0.4.0-py3-none-any.whl

Total release size: 9.0 kB

Release files / django-expression-fields-0.4.0.tar.gz

Download URL django-expression-fields-0.4.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
63d16c88046a2dd772c21f6cb4789ab941861a69511865ef0ccd33d5e640dea4
BLAKE2b-256 checksum
How to use checksums
eac5bc10cdedbbc5ae1c7449d1ad3d19e7076a9922795716aaa812f77cdaa4b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release files / django_expression_fields-0.4.0-py3-none-any.whl

Download URL django_expression_fields-0.4.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be0f2b8c83435266dc15b52e52819a7ef1073a8ff8b749ff3433bd2b842c4ddd
BLAKE2b-256 checksum
How to use checksums
850dd470c45c5acf063d0dede32ab84160404e4f406a3a8dc4aeb5048caad96b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Security for django-expression-fields 0.4.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page