def __init__(self, *args, **kwargs): """ Regular initialization with a custom has_valid_location property. Rather than modify the data on import, we mark the location as invalid. """ super(PartnerLibrary, self).__init__(*args, **kwargs) self.has_valid_location = self.st.upper() in states.keys()
def save(self, *args, **kwargs): self.has_valid_location = self.st.upper() in states.keys() super(PartnerLibrary, self).save(*args, **kwargs)