Open yjacolin opened 2 years ago
Here is a solution using a signal
@receiver(post_save, sender=Person)
def gsheets_sync(sender, instance=None, **kwargs):
print('post save callback')
instance.push_to_sheet()
My choice finally goes to this better solution:
@receiver(post_save, sender=Person) #add this
def create_person(sender, instance, created, **kwargs):
if not created:
Person.push_to_sheet()
Use case:
Is it possible to push my changes to the google sheet with a signals?