Opened 5 years ago
Closed 5 years ago
#32002 closed New feature (fixed)
Allow headers to be passed into HttpResponse()
| Reported by: | Tom Carrick | Owned by: | Tom Carrick |
|---|---|---|---|
| Component: | HTTP handling | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
e.g. HttpResponse('content', headers={'X-Foo': 'aaa'})
I think it also makes sense to add this to django.shortcuts.render.
Change History (11)
comment:1 by , 5 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 5 years ago
| Type: | Uncategorized → New feature |
|---|
comment:3 by , 5 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:5 by , 5 years ago
| Patch needs improvement: | set |
|---|
comment:6 by , 5 years ago
| Patch needs improvement: | unset |
|---|
comment:7 by , 5 years ago
| Needs documentation: | set |
|---|
comment:8 by , 5 years ago
| Needs documentation: | unset |
|---|
comment:9 by , 5 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Note:
See TracTickets
for help on using tickets.
Yes, as per discussion, certainly for the main feature.
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...".)