def to_python(self, value):
        if value is not None:
            try:
                value = dbsafe_decode(value, self.compress)
            except:
                # If the value is a definite pickle; and an error is raised in
                # de-pickling it should be allowed to propogate.
                if isinstance(value, PickledObject):
                    raise
        return value
B64decode and unpickle the object, optionally decompressing it.
dataset/ETHPy150Open callowayproject/django-supertagging/supertagging/fields.py/PickledObjectField.to_python