djangosnippets.org: Latest snippets tagged with 'utility'http://djangosnippets.org/tags/utility/2010-04-28T05:07:37.894461-05:00Quick script to convert json data to csv
2010-04-28T05:07:37.894461-05:00stephenemsliehttp://djangosnippets.org/snippets/2000/<p>I often need to dump data from a database to csv. This little snippet should make it easy enough to do without having to worry too much about character encodings, though it does assume you want your csv file to be utf-8 encoded.</p>
<p>Note that this dumps just one table …</p>
Freely redistributableShortcuts to your code organized by type (views, models, admin, ...)
2010-03-07T09:47:08.658176-06:00stdbrouwhttp://djangosnippets.org/snippets/1954/<p>Sometimes, when you're working on improving one specific aspect of your site, it's easier to browse your code by type than by application. E.g. you want quick access to all admin.py files because you're improving or customizing your admin site across the board and not for a specific app. This …</p>
Freely redistributableDjango Database Migration Management Script
2008-07-03T11:51:47.798522-05:00paltmanhttp://djangosnippets.org/snippets/849/<p>Script to help manage database migrations. Explanation and background can be found in blog post at <a href="http://paltman.com/2008/07/03/managing-database-changes-in-django/">paltman.com</a>.
</p>
Freely redistributableSQLite database vacuum script
2007-05-13T20:21:18.559468-05:00pbxhttp://djangosnippets.org/snippets/234/<p>This script can be run periodically (e.g. as a nightly cronjob) to keep a SQLite database with high churn from growing unnecessarily large.</p>
Freely redistributableThe chunkmaker
2007-05-11T09:52:52.814868-05:00pbxhttp://djangosnippets.org/snippets/227/<p>This is a general-purpose utility function, but since it uses lazy sequences via itertools, so it should be suitable for use with Querysets.</p>
Freely redistributableImport mail into a Django model
2007-04-12T10:45:43.615401-05:00pbxhttp://djangosnippets.org/snippets/173/<p>A mildly crufty script to slurp mail from an mbox into a Django model. I use a
variant of this script to pull the contents of my scammy-spam mbox into the database displayed at <a href="http://purportal.com/spam/">http://purportal.com/spam/</a></p>
Freely redistributable