def toggles_dict(username=None, domain=None):
    return {t.slug: True for t in all_toggles() if (t.enabled(username) or
                                                    t.enabled(domain))}
Loads all toggles into a dictionary for use in JS
dataset/ETHPy150Open dimagi/commcare-hq/corehq/toggles.py/toggles_dict