catch ImproperlyConfigured exception for Django imports