Django 1.6 fix
Now also works with older versions of Django
Merge pull request #1 from cuu508/master

Django 1.6 support