samedi 2 janvier 2016

Django: how to add http header to responses in a convenient way?

I know we can use HttpResponseInstance['headername'] = 'headervalue' to add header to http response. But in this way, I have to rewrite all the generic view I am using, which makes much more work.

Is there a convenient way to add header to responses, like a callback for responses, or a url decorator?




Aucun commentaire:

Enregistrer un commentaire