Django 1.6 compatibility

Fixes a couple of imports which no longer work to use new Django APIs. Maintains backward compatibility from what I can tell from docs (at least to Django 1.3).
Could you add a comment: from which version has this been changed?