Fix django crash found by Alexander Cherepanov
Merge pull request #257 from kholia/django-fixes

Fix django crash found by Alexander Cherepanov