djangosnippets.org: Latest snippets tagged with 'stream'http://djangosnippets.org/tags/stream/2016-12-01T04:07:49.905209-06:00A streamable "export to CSV" admin action
2016-12-01T04:07:49.905209-06:00namlookhttp://djangosnippets.org/snippets/10595/<p>This snippets is inspired from <a href="https://djangosnippets.org/snippets/2995/">#2995</a> but add the following:</p>
<ul>
<li>get rid of <code>singledispatch</code> so we can use it with python2 without pip installing anything</li>
<li>streaming capabilities</li>
<li>the configuration params (header, fields, exclude...) are passed to the action function so we don't pollute the ModelAdmin class</li>
<li>fix utf8 issue in …</li></ul>
Freely redistributablestreaming dump_data
2009-03-29T21:03:52.979071-05:00kcarnoldhttp://djangosnippets.org/snippets/1402/<p><code>dumpdata</code> without <code>MemoryErrors</code>, with progress notification. Most of the real work is done by snippets <a href="http://www.djangosnippets.org/snippets/1400/">1400</a> and <a href="http://www.djangosnippets.org/snippets/1401/">1401</a>.</p>
<pre><code>./manage.py dumpdata_stream --format=xml > big_dump.xml
</code></pre>
<p>This is basically the stock Django <code>dumpdata</code> with a few modifications. Django devs: it's hard to reuse parts of most Django management commands. A little …</p>
Freely redistributable