Django Field to help metrics handling
Project description
This project aims to add helpers for FloatField with:
Specify unit (meters, feet, bytes) as field’s metadata
Specify a number of decimal (without DecimalField)
Add get_FIELD_display method on model
Example
from django.db import models from pony_unitfield.fields import UnitField class MyModel(models.Model): default = UnitField(unit='foo', null=True) no_decimal = UnitField(unit='bar', decimal=0, null=True) one_decimal = UnitField(unit='ham', decimal=1, null=True) non_spaced = UnitField(unit='bone', spaced_display=False, null=True)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pony-unitfield-0.2.tar.gz
(5.1 kB
view details)
File details
Details for the file pony-unitfield-0.2.tar.gz
.
File metadata
- Download URL: pony-unitfield-0.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d0aab5aa01746f1481881f199f73047c210456f6cfcf4aabdc151a035bf9100 |
|
MD5 | bdaa565ec50167910986b1a96972e14a |
|
BLAKE2b-256 | 470747747ae81e80de6fa31a3151c248da7244977de37ea03678cacd2fecf3a8 |