[Django] #32002: Allow headers to be passed into HttpResponse()

8 views
Skip to first unread message

Django

unread,
Sep 14, 2020, 5:30:27 AM9/14/20
to django-...@googlegroups.com
#32002: Allow headers to be passed into HttpResponse()
-----------------------------------------+------------------------
Reporter: Tom Carrick | Owner: nobody
Type: Uncategorized | Status: new
Component: HTTP handling | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
[https://groups.google.com/u/2/g/django-developers/c/rlt1HhEaPaM Mailing
list discussion]


e.g. `HttpResponse('content', headers={'X-Foo': 'aaa'})`

I think it also makes sense to add this to `django.shortcuts.render`.

--
Ticket URL: <https://code.djangoproject.com/ticket/32002>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Sep 14, 2020, 5:30:38 AM9/14/20
to django-...@googlegroups.com
#32002: Allow headers to be passed into HttpResponse()
-------------------------------+---------------------------------------
Reporter: Tom Carrick | Owner: Tom Carrick
Type: Uncategorized | Status: assigned

Component: HTTP handling | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+---------------------------------------
Changes (by Tom Carrick):

* owner: nobody => Tom Carrick
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/32002#comment:1>

Django

unread,
Sep 14, 2020, 6:09:04 AM9/14/20
to django-...@googlegroups.com
#32002: Allow headers to be passed into HttpResponse()
-------------------------------+---------------------------------------
Reporter: Tom Carrick | Owner: Tom Carrick
Type: New feature | Status: assigned

Component: HTTP handling | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+---------------------------------------
Changes (by Tom Carrick):

* type: Uncategorized => New feature


--
Ticket URL: <https://code.djangoproject.com/ticket/32002#comment:2>

Django

unread,
Sep 15, 2020, 2:31:28 AM9/15/20
to django-...@googlegroups.com
#32002: Allow headers to be passed into HttpResponse()
-------------------------------+---------------------------------------
Reporter: Tom Carrick | Owner: Tom Carrick
Type: New feature | Status: assigned
Component: HTTP handling | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+---------------------------------------
Changes (by Carlton Gibson):

* stage: Unreviewed => Accepted


Comment:

Yes, as per discussion, certainly for the main feature.

> I think it also makes sense to add this to django.shortcuts.render.

I'm initially sceptical about this. I think we should be cautious about
adding extra parameters to shortcuts.
My inclination would be towards saying, "Either adjust the response once
you have it, or don't use `render`" if folks need more than it currently
offers. (Note: "...initially sceptical...".)

--
Ticket URL: <https://code.djangoproject.com/ticket/32002#comment:3>

Django

unread,
Oct 1, 2020, 2:48:45 AM10/1/20
to django-...@googlegroups.com
#32002: Allow headers to be passed into HttpResponse()
-------------------------------+---------------------------------------
Reporter: Tom Carrick | Owner: Tom Carrick
Type: New feature | Status: assigned
Component: HTTP handling | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+---------------------------------------
Changes (by felixxm):

* needs_docs: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/32002#comment:7>

Reply all
Reply to author
Forward
0 new messages