Skip to main content
Help improve PyPI by participating in a 5-minute user interface survey!

A model field to store a file size, whose edition and display shows units.

Project Description

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.

Release history Release notifications

History Node

0.9.1

History Node

0.9

History Node

0.8

History Node

0.7

History Node

0.6

History Node

0.5

History Node

0.4

This version
History Node

0.3

History Node

0.2

History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-sizefield-0.3.tar.gz (3.4 kB) Copy SHA256 hash SHA256 Source None Jun 8, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page