`elasticsearch_indices` is a python list. It doesn't render valid JSON. Your browser is just very forgiving. 

If we don't already have one, I suggest you add something to helpers.py so you can do:
```
+window.ELASTICSEARCH_INDICES = {{ elasticsearch_indices | json }};
```