This can be written as `database = getattr(settings, ES_DATABASE, "http://localhost:9200")`. That said, we probably just want to 404 if ES is not configured.