from django.db import models class UnicodeReprMixIn(object): """ Adds a unicode representation using self._unicode. """ def __unicode__(self): """ Unocode representation of this instance. """ return unicode(self.__getattribute__(self._unicode))