Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Short UUIDField for Django. Good for use in urls & file names. (Base 57, 22 characters)

Project Description


Provides a ShortUUIDField for your Django models which uses the base-57 "Short UUID" package at .

Originally, a fork from David Cramer's excellent django-uuidfield, but not much is left of that besides a bit of structure.


Install it with pip (or easy_install)::

pip install django-shortuuidfield


First you'll need to attach a ShortUUIDField to your class. This acts as a char(22) to maintain compatibility with SQL versions::

from shortuuidfield import ShortUUIDField

class MyModel(models.Model):
uuid = ShortUUIDField()



* ShortUUIDField is a subclass of django.db.models.CharField

* You can pass usual Django CharField parameters on init, although some of them are added/overwritten:
+ max_length=22 (since we are using base-57 format which is fixed at 22 characters)
+ blank=True, editable=False (set auto=False to remove these fields enforcement)

* Uses shortuuid.uuid() that generates uuid4 random values

Release History

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
(3.4 kB) Copy SHA256 Hash SHA256
Source None Sep 3, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate