from django.http import HttpResponse def index(request): response = HttpResponse("Hello world!") response["My-Header"] = "header value" return response