while trying to save an instance of a model, I can't access the attributes values in the custom save() method. I think it should be possible straight forward, just like the docs state. Here's what my code looks like:
class ModelName(models.Model):
attribute1 = models.ManyToManyField("app.ModelName2", related_name="model_name_2")
attribute2 = models.ForeignKey("app.ModelName3", related_name="model_name_3")
def save(self, *args, **kwargs):
super().save()
print(self.attribute1.all()) # <---- it prints an empty qs, but in reality there are instances passed to attribute1 field.
Does anyone have any idea why that would happen? I'm pretty sure I'm missing something super obvious. Thanks in advance!