PHPs strengths: array_count_values

I always like to think of what different interpreted programming languages bring to the table.

Read full post
Python String Formatting

Python 2.6 (and Py3K) introduce a new way to format strings. Perviously you did this:

Read full post
Mimic propel's update_at and created_at in Django models

One “trick” that propel offers you is tables with fields created_at and updated_at.

Read full post
Django models: saving markdown

I love markdown. I write my blogs in markdown. For most user text areas in my web apps I support markdown and save both the markdown and the formatted text into my data store.

Read full post
Custom error messages for Django forms

For some reason, it was difficult for me to find the documentation for this. If your Django form field is required you’ll by default get an error stating that ‘This field is required.’ You can easily replace that when defining your form like so:

Read full post
sfGuardUser -> django.contrib.auth

If you find yourself moving from symfony to Django, here’s how you sf_guard_user’s user table to django.contrib.auth user table:

Read full post
Picking up loose ends: Position Pieces

I’m picking up a pet project of mine that I was working on a few months back. It’s written in Django and is openID enabled… but I didn’t used django openID and I have no clue why… I wrote my own code.

Read full post
Django Admin and Cookies

I was dusting off an old Django project and everything was working except the admin site:

Read full post