Skip to content

Instantly share code, notes, and snippets.

@jrast
jrast / MultiColumnField.py
Last active August 29, 2015 14:00 — forked from olivergeorge/gist:718687
Django model field which maps a single model field to mutliple db columns
from django.core.exceptions import ValidationError
from django.db.models import Field, CharField
__all__ = ['MultiColumnField']
try:
from hashlib import md5
except ImportError:
from md5 import new as md5