def get_value_for_datastore(self, model_instance):
        """Get key of reference rather than reference itself."""
        table_id = getattr(model_instance, self.table_fieldname, None)
        object_id = getattr(model_instance, self.object_fieldname, None)
        return table_id, object_id
def get_value_for_datastore ( self , model_instance ) : table_id = getattr ( model_instance , self . table_fieldname , None ) object_id = getattr ( model_instance , self . object_fieldname , None ) return table_id , object_id
Get key of reference rather than reference itself.