def process_response(self, request, response):
    self.duration = time.time() - request.start_time
response['x-server-time'] = datetime.now().strftime('%d/%m/%Y %H:%M')
Django Middleware - How to edit the HTML of a Django Response object?