 <p>Alright, I found out that the problem was in another function that was still expecting the dictionary to be a list. The reason I couldn't see it right away is that Django left a very cryptic error message. I was able to get a better one using <code>python manage.py shell</code> and importing the module manually.</p> <p>Thanks for your help everyone.</p>