[Answered ]-Django – Inserting related instance

2👍

at the end of your ‘save‘ method you must call the superclass ‘save‘:

def save(self, *args, **kwargs):
    season = Season.objects.order_by('start')[0]
    self.season = season
    super(MyModelName,self).save(*args,**kwargs)

Leave a comment