django-pint
django-pint copied to clipboard
Simple django app for storing Quantities with units, leveraging the Pint library
updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) - [github.com/PyCQA/autoflake.git: v2.2.1 → v2.3.1](https://github.com/PyCQA/autoflake.git/compare/v2.2.1...v2.3.1) - [github.com/psf/black: 23.12.1 → 24.4.2](https://github.com/psf/black/compare/23.12.1...24.4.2) - [github.com/PyCQA/bandit.git: 1.7.6 → 1.7.8](https://github.com/PyCQA/bandit.git/compare/1.7.6...1.7.8) - [github.com/crate-ci/typos.git: v1.17.2 → v1.21.0](https://github.com/crate-ci/typos.git/compare/v1.17.2...v1.21.0)
Because the value of an item using QuantityFormField defaults to the base unit when updating, even if the user originally entered a value using some other unit from `unit_choices`, they...
The widgets provided for ArrayField in the admin do not handle the units in an elegant way. I would have expected a comma delimited list of values and a drop...
Currently: https://github.com/CarliJoy/django-pint/blob/75e516a819a16422b93bad873e064a3ce179a927/src/quantityfield/fields.py#L206 is not covered in tests. It would be nice to look in django test to figure out some tests that would test the localization of the field. @cornelv...
We have some code examples in the README. It would be great if this examples would be checked automatically with [doctest](https://www.sphinx-doc.org/en/master/usage/extensions/doctest.html) But for this we would need to convert the...
Pint has special string formatting support. For example, from [the docs](https://pint.readthedocs.io/en/latest/tutorial.html#string-formatting): ``` >>> accel = 1.3 * ureg['meter/second**2'] >>> 'The HTML representation is {:H}'.format(accel) 'The HTML representation is 1.3 meter/second2'...
updates: - [github.com/psf/black: 24.4.2 → 24.8.0](https://github.com/psf/black/compare/24.4.2...24.8.0) - [github.com/PyCQA/flake8: 7.0.0 → 7.1.1](https://github.com/PyCQA/flake8/compare/7.0.0...7.1.1) - [github.com/PyCQA/bandit.git: 1.7.8 → 1.7.9](https://github.com/PyCQA/bandit.git/compare/1.7.8...1.7.9) - [github.com/crate-ci/typos.git: v1.22.0 → v1.23.6](https://github.com/crate-ci/typos.git/compare/v1.22.0...v1.23.6)
Is there a(lready) way to use the QuanityField with a pint [context](https://pint.readthedocs.io/en/stable/user/contexts.html)? An example of what I would like to do (note the units for force [Newtons] and weight [kilogram]...
updates: - [github.com/PyCQA/bandit.git: 1.7.9 → 1.7.10](https://github.com/PyCQA/bandit.git/compare/1.7.9...1.7.10) - [github.com/crate-ci/typos.git: v1.24.5 → v1.24.6](https://github.com/crate-ci/typos.git/compare/v1.24.5...v1.24.6)
Its time to update the Python and Django Version test matrix again.