Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Height / Weight fields for Django models & forms with unit conversion

Project description

Custom model fields to store, retrieve and convert measurements of height, weight and more.

Authored by Basil Shubin, and some great contributors.


pip install django-unitology

External dependencies

  • jQuery - this is not included in the package since it is expected that in most scenarios this would already be available.


Add unitology to INSTALLED_APPS:


Update your file:

urlpatterns += [
    url(r'^unitology/', include('unitology.urls')),

When deploying on production server, don’t forget to run:

python collectstatic



from django.db import models
from django.contrib import admin

from unitology.models import UnitsFieldMixin
from unitology.fields import WeightField, HeightField
from unitology.forms import UnitsFieldFormMixin

class Person(UnitsFieldMixin):

    name = models.CharField(max_length=128)

    weight = WeightField(blank=True, null=True)
    height = HeightField(blank=True, null=True)

class PersonChangeForm(UnitsFieldFormMixin):

    class Meta:
        model = Person

class PersonAdmin(admin.ModelAdmin):
    form = PersonChangeForm, PersonAdmin)

Please see example application. This application is used to manually test the functionalities of this package. This also serves as a good example.

You need only Django 1.4 or above to run that. It might run on older versions but that is not tested.


django-unitology is released under the MIT license.

Project details

Release history Release notifications

This version
History Node


History Node


History Node


History Node


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_unitology-0.0.4-py2-none-any.whl (18.3 kB) Copy SHA256 hash SHA256 Wheel 2.7 Jan 21, 2017
django-unitology-0.0.4.tar.gz (10.6 kB) Copy SHA256 hash SHA256 Source None Jan 21, 2017

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