This line breaks in Django 1.7.

@dnozay I don't think I understand the magic in this code section well enough to fix it.  Do you have any interest in taking a stab at digging into how we might get around this issue?