add header info in django response

To add header info in a Django response, you can follow these steps:

  1. Import the necessary modules:
from django.http import HttpResponse
  1. Create a HttpResponse object with the desired content:
response = HttpResponse("Your response content")
  1. Add the header information to the HttpResponse object using the response object's ['key'] notation:
response['Your-Header-Name'] = 'Your-Header-Value'
  1. Return the response object:
return response