Merge branch 'upgrade_django_16' into develop (fixes #938)