def get_prep_lookup(self, lookup_type, value): return crc64(value)
def pre_save(self, model_instance, add): obj = getattr(model_instance, self.object_field) return None if obj is None else crc64(obj)