def get_prep_value(self, value): if value is None: return None return smart_text(base64.b64encode(pickle.dumps(value)))