Q:

Django call method after object save with new instance

I want to call a method after this object (in this example Question) is saved.
This is what I got:
class Question(models.Model):
    ...

    def after_save(sender, instance, *args, **kwargs):
        some_method(instance)

post_save.connect(Question.after_save, sender=Question)

It kind of works. But the problem is that the instance data is the old one (same as before the save). So some_method(instance) gets the old instance.
But I need the instance with the new data.

A:

The method you call from post_save signal should be outside of the Model. You can put the method inside the models.py or in another file such as signals.py
class Question(models.Model):
    ...
    def some_method(self):
        return "hello"

def question_saved(sender, instance, *args, **kwargs):
    instance.some_method()

post_save.connect(question_saved, sender=Question)

