Compatibility up to Django 2.1, dropped < 1.8. Removed unused code, fixed tests.