Task #4077
Story #3944: DataONE Python products
Look into using Django's StreamingHttpResponse in GMN
100%
History
#1 Updated by Roger Dahl almost 11 years ago
GMN currently instantiates HttpResponse with an iterator when returning objects from MNStorage.get(). This method is deprecated as of Django 1.5 and will stop working in Django 1.7.
From Django docs:
Passing iterators
Finally, you can pass HttpResponse an iterator rather than strings. If you use this technique, the iterator should return strings.
Passing an iterator as content to HttpResponse creates a streaming response if (and only if) no middleware accesses the HttpResponse.content attribute before the response is returned.
Changed in Django 1.5.
This technique is fragile and was deprecated in Django 1.5. If you need the response to be streamed from the iterator to the client, you should use the StreamingHttpResponse class instead.
As of Django 1.7, when HttpResponse is instantiated with an iterator, it will consume it immediately, store the response content as a string, and discard the iterator.
#2 Updated by Roger Dahl almost 11 years ago
- Status changed from New to Closed
- translation missing: en.field_remaining_hours set to 0.0