Backport of r13622 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@13623 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Thanks to pmd for report, zhaoz, mmalone and justinlilly for patch git-svn-id: http://code.djangoproject.com/svn/django/trunk@11914 bcc190cf-cafb-0310-a4f2-bffc1f526a37