Dictionary lookup removed for request object in Django 1.0 and other fun facts.

Porting pre 1.0 Django to 1.0 is apparently not a walk in the park.

For one thing django.core.validators, which I was using, was removed. The fix: copy it back from the earlier version.

Not sure if it was a bad practice or not but I was also doing dictionary lookups on the request object and that's been removed now.

The errors you will get are:

If you're in the same boat, here's the regular expressions you need to find/replace in TextMate:

Fix 'WSGIRequest' object is not iterable:

Find:

' in request(?!\.)

Replace:

' in request.REQUEST

'WSGIRequest' object is unsubscriptable:

Find:

request\['

Replace:

request.REQUEST['

Also, I switched from using Google App Engine Helper for Django to app-engine-patch. The main reason? So I could have the sessions middleware and run the PyAMF Shell. (And, of course, it's good to be running Django 1.0 now.)

App-engine-patch supports Django's mail feature so I stopped using google.appengine.api.mail.EmailMessage and replaced it with django.core.mail.EmailMessage. One thing to note if you do this is that you need to change the to properties on your EmailMessage instances to be lists, not strings, lest you end up trying to email each letter in the email address separately.

(Also, on my local server, I keep getting a Broken Pipe (error 32) since I upgraded to Django 1.0. I set fail_silently to True on my send() calls and that's fixed it. I don't have any issues on the deployment server. Looking into that one but it's a hairy one to track down.)

Comments