@receiver(post_save, sender=StudentActionModel)
def save_student_activity(sender, instance, **kwargs):
# update the model object with some info from the request object
instance.came_from = request.REQUEST.get('request_came_from')
instance.save()
The user story: An user clicks somewhere, and we are recording his action. Can we, somehow, get access to the original request object so we will be able to extract some required information from it?
The catch: We cannot change the StudentActionModel code, we're writing a plugin to the original Django application and can't change any of the original code. We are just defining a listener for the 'post_save' signal and we need a piece of data from the original request object.