Django 1.7.x compatibility

Current patch resolve Django 1.7.x compatibility.

Tested on Django 1.7.1