Django attachment and custom data in response <p>Could someone please let me know if I can add custom message in HTTP response along with a attachment in Django</p> <p>Here is my django response with file attachment. </p> <pre><code>data = key[0] response = HttpResponse(data, content_type='text/plain') response['Content-Disposition'] = 'filename=license.txt' </code></pre> <p>I also want to send additional data with response (not part of attachment) like employee id '2343'. Can it be done? Is it a good idea to add data to header ?</p> <p>thanks in advance!</p>