Reliably Broken
Per-instance choices for Django's forms.ChoiceField
I keep forgetting the details of how one customizes the choices in a forms.ChoiceField per instance. The forms.ChoiceField documentation says the required argument has to be an iterable but then moves straight to the next section.
March 11, 2009
First steps with South
My first time using a schema evolution tool for a Django project, and I like it. I chose South because it had a clear path for devolving a schema and had a database-independent API (I’ve been testing Postgres with some projects that currently use a MySQL database since we have a Trac installation that uses Postgres anyway).
March 4, 2009
Adobe's download manager
I had to install a trial version of Adobe Flash CS4 the other day, and came across their latest tactic in making the world more complicated and hateful: the Adobe download manager.
February 3, 2009
Setting Mac Office 2008 default save formats
Microsoft Office 2008 for Mac uses the new Office Open XML formats by default which is a pain in an office where many staff will be using previous versions for some time.
January 29, 2009
Ignore the docs, use 'value' to set value in jQuery.UI.progressbar
The online documentation for the progressbar plugin for jQuery.UI says to use “progress” as the keyword when setting the value of your progress bar, something like this:
January 19, 2009
Using screen to log a terminal session
Note to self: use screen when doing a bunch of remote administration stuff over an SSH connection. You can tell it to log the session to a separate file, and can detach the session and log off without having the remote shell be terminated. Then later you can resume the session and haven’t lost anything.
January 6, 2009
Using separate forms for adding and changing in Django's admin
The Django documentation describes how to override the form class used by the admin site when adding or editing your objects. It is easy, you just specify a form attribute on your ModelAdmin sub-class, and point it at your custom Form or ModelForm class.
January 4, 2009
Avoiding the config menu when installing a FreeBSD port
Note to self: if you want to install a port from the FreeBSD ports collection and you want to avoid the configuration menu that some ports use, then set the BATCH build variable.
January 2, 2009
Using SQLAlchemy with Django
This post is an introduction to using SQLAlchemy and Django together to make a simple web-based asset catalogue. The examples make use of SQLAlchemy 0.4 and Django 0.97-pre.
June 16, 2008
Choosing SQLAlchemy over Django
In the DJUGL post-meet pub chat Simon Willison was curious about people’s experiences combining Django with SQLAlchemy. I’ve used SQLAlchemy’s ORM with Django in two projects; on both occasions I quickly chose to substitute Django’s ORM with SQLAlchemy’s because I was dealing with an existing SQL schema which I could not alter and which did not fit well with Django’s ORM.
June 15, 2008