def __init__(self):
    if not hasattr(self,'time'):
        self.time=1
    from django.core.signals import request_finished
    from django.dispatch import receiver
    
    @receiver(request_finished)
    def my_callback(sender, **kwargs):
        print("------------ Request finished!-------------")

        

