Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#20331 closed Bug (fixed)

Django admin action cannot serve StreamingHttpResponse

Reported by: Edwin <django@…> Owned by: nobody
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: timograham@… 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

I think it's reasonable enough to have an admin action that serves a StreamingHttpResponse.
Patch is attached.

Attachments (2)

admin-action-streaming.patch (1.6 KB ) - added by Edwin <django@…> 11 years ago.
20331.diff (5.7 KB ) - added by Edwin <django@…> 11 years ago.

Download all attachments as: .zip

Change History (14)

by Edwin <django@…>, 11 years ago

comment:1 by Edwin <django@…>, 11 years ago

Component: Uncategorizedcontrib.admin
Has patch: set
Type: UncategorizedBug

comment:2 by Simon Charette, 11 years ago

Needs documentation: set
Needs tests: set
Triage Stage: UnreviewedAccepted
Version: 1.5master

This is a reasonable request indeed. This needs testing and an entry in the release note.

comment:3 by Aymeric Augustin, 11 years ago

Yay type checks :-/

The proper solution is to test for HttpResponseBase (a private API that lives in django.http.response).

comment:4 by Aymeric Augustin, 11 years ago

Patch needs improvement: set

by Edwin <django@…>, 11 years ago

Attachment: 20331.diff added

comment:5 by Łukasz Balcerzak, 11 years ago

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

Patch looks pretty good

comment:6 by Aymeric Augustin, 11 years ago

I'm committing this, I'll just remove the line from the release notes because it's really a bugfix, and we don't mention them all.

comment:7 by Aymeric Augustin, 11 years ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

Hmm, actually six admin_views tests fail under Python 3 with this patch.

comment:8 by Tim Graham, 11 years ago

Cc: timograham@… added
Patch needs improvement: unset

Fixed tests and removed release note.

https://github.com/django/django/pull/1230

comment:9 by Simon Charette, 11 years ago

Triage Stage: AcceptedReady for checkin

Ran all admin_views tests on Python 2.7.3 and 3.2.3 with success, marking as RFC.

comment:10 by Tim Graham <timograham@…>, 11 years ago

Resolution: fixed
Status: newclosed

In d727518ad61beda4d9c2b744c9c05a805aa23ed1:

Fixed #20331 -- Allowed admin actions to serve StreamingHttpResponses

Thanks Edwin.

comment:11 by Paul Garner, 10 years ago

Is there any policy on backporting this fix to older versions...? my project is on 1.5 and I just hit this bug

I'm happy to do the work if it can get merged quickly

comment:12 by Tim Graham, 10 years ago

1.5 is receiving only security fixes at this time. See the supported versions policy for details.

Note: See TracTickets for help on using tickets.
Back to Top