django-sizefield 0.1
A model field to store a file size, whose edition and display shows units (KB, MB, ...)
django-sizefield
A file size field, stored as BigInteger and rendered with units in Bytes (KB, MB, ...)
Examples
With a model like
class Data(models.Model):
path = models.FilePathField()
size = FileSizeField()
In templates
{% load sizefieldtags %}
{{ data.size|filesize }}
will render 12.3KB (for example)
The model form will have a TextInput, which renders the value with units, and accepts values with or without units.
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| django-sizefield-0.1.tar.gz (md5) | Source | 2010-12-20 | 2KB | 388 | |
- Author: Mathieu Leplatre
- Home Page: https://github.com/leplatrem/django-sizefield
- Keywords: django,field,filesize
- License: LGPL
- Platform: any
- Provides sizefield
- Categories
- Package Index Owner: emel, leplatrem
- DOAP record: django-sizefield-0.1.xml
