fix imports; move checks into settings.py