fix compatibility issue with Django 1.6
Merge pull request #44 from PetrDlouhy/master

Compatibility fix for Django 1.6