djangosnippets.org: Latest snippets tagged with 'tool'https://djangosnippets.org/tags/tool/2010-02-08T02:52:07.731305-06:00django_bulk_save.py - defer saving of django models to bulk SQL commits
2010-02-08T02:52:07.731305-06:00preetkukretihttps://djangosnippets.org/snippets/1913/<p>When called, this module dynamically alters the behaviour of model.save() on a list of models so that the SQL is returned and aggregated for a bulk commit later on. This is much faster than performing bulk writing operations using the standard model.save().</p>
<p>To use, simply save the code as django_bulk_save.py …</p>
Freely redistributableExport Models
2008-06-27T03:41:44.470215-05:00brunobordhttps://djangosnippets.org/snippets/825/<p>Warning: This python script is designed for Django 0.96.</p>
<p>It exports data from models quite like the <code>dumpdata</code> command, and throws the
data to the standard output.</p>
<p>It fixes glitches with unicode/ascii characters. It looked like the 0.96
handles very badly unicode characters, unless you specify an argument that is …</p>
Freely redistributabledb_dump.py - for dumpping and loading data from database
2007-02-25T19:25:38.509691-06:00limodouhttps://djangosnippets.org/snippets/14/<h1>Description</h1>
<p>This tool is used for dump and restore database of Django. And it can also support some simple situations for Model changes, so it can also be used in importing data after the migration of Model.</p>
<p>It includes: dump and restore.</p>
<h1>Dump</h1>
<p>Command Line:</p>
<pre><code>python db_dump.py [-svdh] [--settings] dump …</code></pre>
Freely redistributable