Added python3 and Django1.7 compatibility