Optional Date Fields in Django
Adding blank=True on any field in your models.py file will keep the admin interface from requiring that field. That’s all you need to do if it’s a string field. If it’s an integer, boolean, or a date; you need to add null=True to the field as well.
date = models.DateField(blank=True, null=True)
Source
See also
When to use and when not to use NOT NULL in MySQL / Rails Migrations
Pluralization of Database Models in Django
Part of the “magic-removal” was apparently removing automatic pluralization. That’s a shame. That’s one thing I really dig about Rails.
In your models.py file:
class Meta:
verbose_name_plural = 'something'
So for a ‘Person’ model, you could put ‘people’. Now it will look right in the admin interface.
Creating a Web Archive of a Writeboard in Yojimbo
- Share the Writeboard with yourself
- Get the password out of the email you receive
- Archive the item in Yojimbo
- In the password prompt inside of the archive in Yojimbo, put the password from the email
- Submit the form
- Delete the web archive
- Archive the Writeboard again
How to set up Photoshop for Web
- View > Proof Setup > Monitor RGB
- Edit > Color Settings (or shift-cmd-K)
- Change RGB working space to Monitor RGB - Color LCD
- Set color management to off for RGB
Anything else? Anything different in CS3 beta? Anybody with differing opinions?
Update 2007-12-01: Just for the record, here’s the extra thing you have to do for CS3:

Un-check the option to Convert to sRGB in the Save for Web & Devices dialog.
Using SQLite in memory mode for Rails testing
Watching the latest PeepCode at about the 15:00 mark, he mentions using SQLite in memory mode for your testing database. Here’s what you put in your config/database.yml:
test:
adapter: sqlite3
database: ":memory:"
verbosity: silent
Run these commands:
$ script/plugin install memory_test_fix (use `--force` if you have any problems)
$ rake db:migrate
$ rake
Then you’re ready to go.
Sources:
See also how to set up SQLite for Rails
Delete photos inside an album in iPhoto
If you want to move photos to the trash that are inside of an album (smart or otherwise), you can’t just drag them to the trash icon (?!). You have to hit cmd-option-delete.
Now you know.
Rails Migration Data Types
Is this all of them?
:integer
:float
:datetime
:date
:timestamp
:time
:text
:string
:binary
:boolean
Found this:
Valid column types are integer, float, datetime, date, timestamp, time, text, string, binary, and boolean. Valid column options are limit, null (i.e. ” :null => false” implies NOT NULL), and default (to specify default values).
Why is this hard to find? Google search for “rails migration data types” isn’t that good.
And what’s the difference between datetime and timestamp? Or binary and boolean? Any database gurus read this?